@wisemen/wise-invoicing-web 0.0.4 → 0.0.6

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 (91) hide show
  1. package/dist/{BillingDocumentDetailViewDataProvider-pePmiXWb.js → BillingDocumentDetailViewDataProvider-BGE-p_FL.js} +953 -863
  2. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  3. package/dist/{BillingDocumentPdf-Dg5JlQE1.js → BillingDocumentPdf-Ca81NkZq.js} +4 -4
  4. package/dist/{CreditNoteDetailViewDataProvider-C-A0jyVr.js → CreditNoteDetailViewDataProvider-b5dY_4mH.js} +181 -181
  5. package/dist/{CreditNotePdfViewDataProvider-DNUvFVDj.js → CreditNotePdfViewDataProvider-C2QqCdQ7.js} +3 -3
  6. package/dist/{CustomFieldValueText-DDQq-975.js → CustomFieldValueText-ne5yy02J.js} +2 -2
  7. package/dist/DataProvider-Dj34ljUX.js +75 -0
  8. package/dist/{DunningCaseDetailViewDataProvider-0WV-7-vg.js → DunningCaseDetailViewDataProvider-jsh-LlGx.js} +68 -59
  9. package/dist/DunningCaseOverviewView-WbXalMt6.js +747 -0
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +1 -1
  11. package/dist/DunningCaseSendDialog-D7jAZ8yT.js +349 -0
  12. package/dist/{InvoiceDetailViewDataProvider-BDL9lAWe.js → InvoiceDetailViewDataProvider-BAVdcJay.js} +589 -498
  13. package/dist/{InvoiceOverviewViewDataProvider-B_jrcC_8.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +546 -482
  14. package/dist/{InvoicePdfView-Bygb-9z6.js → InvoicePdfView-BpIaYdZX.js} +2 -2
  15. package/dist/{InvoicePdfViewDataProvider-nBk3XNrE.js → InvoicePdfViewDataProvider-DGCnmNE-.js} +3 -3
  16. package/dist/{InvoicePublicPdfViewDataProvider-DHJP_-7-.js → InvoicePublicPdfViewDataProvider-KV0_hKUI.js} +3 -3
  17. package/dist/{IssuerSettingsViewDataProvider-Dk_Q6w6f.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
  18. package/dist/ReminderSettingsViewDataProvider-D4bRLLXx.js +711 -0
  19. package/dist/{api.util-Dm_TQedZ.js → api.util-BCSgCfpS.js} +528 -509
  20. package/dist/{billingDocumentDetail.transformer-zMTbka5p.js → billingDocumentDetail.transformer-DIKAl4_L.js} +58 -89
  21. package/dist/client/index.d.ts +1 -1
  22. package/dist/client/types.gen.d.ts +28 -5
  23. package/dist/client/zod.gen.d.ts +869 -623
  24. package/dist/{creditNoteDetail.query-BZqgZRSu.js → creditNoteDetail.query-DHP69UiB.js} +13 -13
  25. package/dist/{dist-DP8KNFVD.js → dist-D9lp7NDv.js} +20 -36
  26. package/dist/{dist-DJ8yJcb9.js → dist-PErDVE6-.js} +621 -671
  27. package/dist/{documentTitle.composable-CeaFddr1.js → documentTitle.composable-4ApFl9TZ.js} +10 -8
  28. package/dist/{i18n.lib-DUbAMBRb.js → i18n.lib-BGcQ_OBF.js} +50 -2
  29. package/dist/index.d.ts +51 -2
  30. package/dist/index.js +78 -78
  31. package/dist/{invoice.service-ChHEtXBA.js → invoice.service-DG5eacZC.js} +46 -46
  32. package/dist/{invoiceDeliveryStatus.util-BsA-MlA3.js → invoiceDeliveryStatus.util-CX-IdqAu.js} +28 -28
  33. package/dist/{invoiceDetail.query-O_CGvdwg.js → invoiceDetail.query-C_IMGjOX.js} +1 -1
  34. package/dist/{invoicingConfig.composable-c6w_aMm1.js → invoicingConfig.composable-Kad_HHx_.js} +2 -2
  35. package/dist/{issuerSettings.query-RqtrZFaB.js → issuerSettings.query-6wnSPphB.js} +2 -2
  36. package/dist/libs/i18n.lib.d.ts +50 -2
  37. package/dist/locales/en-US.json.d.ts +25 -1
  38. package/dist/locales/nl-BE.json.d.ts +25 -1
  39. package/dist/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.d.ts +9 -3
  40. package/dist/modules/dunning-case/actions/dunningCase.actions.d.ts +12 -0
  41. package/dist/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.d.ts +1 -0
  42. package/dist/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.d.ts +1 -0
  43. package/dist/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.d.ts +2 -0
  44. package/dist/modules/dunning-case/models/dunningCase.model.d.ts +12 -3
  45. package/dist/modules/dunning-case/models/reminderConfigForm.model.d.ts +3 -1
  46. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +13 -0
  47. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewCustomerCell.vue.d.ts +7 -0
  48. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewDaysOverdueCell.vue.d.ts +7 -0
  49. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLastReminderCell.vue.d.ts +7 -0
  50. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLevelCell.vue.d.ts +7 -0
  51. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue.d.ts +8 -0
  52. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewOutstandingCell.vue.d.ts +7 -0
  53. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewReminderCell.vue.d.ts +7 -0
  54. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewActionsCell.spec.d.ts +1 -0
  55. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewLastReminderCell.spec.d.ts +1 -0
  56. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewReminderCell.spec.d.ts +1 -0
  57. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +24 -0
  58. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +8 -0
  59. package/dist/modules/dunning-case/use-cases/send/dialogs/dunningCaseBulkSendDialog.spec.d.ts +1 -0
  60. package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +3 -1
  61. package/dist/modules/dunning-case/use-cases/settings/components/reminderLadderFeeNotice.spec.d.ts +1 -0
  62. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +3 -1
  63. package/dist/modules/invoice/api/invoiceIndexCache.util.d.ts +4 -4
  64. package/dist/modules/invoice/api/queries/invoiceUserSearch.query.d.ts +3 -0
  65. package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +8 -0
  66. package/dist/modules/invoice/api/services/invoiceUser.service.d.ts +6 -0
  67. package/dist/modules/invoice/components/form/InvoiceFormPreparedByField.vue.d.ts +16 -0
  68. package/dist/modules/invoice/models/invoice/update/invoicePreparer.model.d.ts +4 -0
  69. package/dist/modules/invoice/models/invoice/update/invoicePreparer.transformer.d.ts +5 -0
  70. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.model.d.ts +3 -0
  71. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.transformer.d.ts +6 -0
  72. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
  73. package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Dfe5r84P.js} +32 -1
  74. package/dist/{reminderConfig.query-DzTN2AvU.js → reminderConfig.query-hmDNKreg.js} +105 -91
  75. package/dist/search.composable-BCtYqudV.js +52 -0
  76. package/dist/style.css +1 -1
  77. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +6 -6
  78. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +1 -1
  79. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +2 -2
  80. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.spec.d.ts +1 -0
  81. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +3 -1
  82. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +2 -0
  83. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
  84. package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +19 -0
  85. package/dist/ui/data-provider/DataProviderErrorState.vue.d.ts +7 -0
  86. package/dist/ui/data-provider/dataProviderErrorState.spec.d.ts +1 -0
  87. package/package.json +6 -1
  88. package/dist/DataProvider-CfHLB3rH.js +0 -48
  89. package/dist/DunningCaseOverviewView-CHdzfbhb.js +0 -553
  90. package/dist/DunningCaseSendDialog-DBtwr2ue.js +0 -350
  91. package/dist/ReminderSettingsViewDataProvider-CDBjfU7R.js +0 -668
@@ -21,7 +21,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
21
21
  duplicateLine: (lineId: string) => string | null;
22
22
  duplicateSelectedLines: () => void;
23
23
  groupSelectedLines: () => void;
24
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
24
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
25
25
  moveSelectedLinesToGroup: (groupId: string) => void;
26
26
  resetToServer: () => void;
27
27
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -483,7 +483,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
483
483
  duplicateLine: (lineId: string) => string | null;
484
484
  duplicateSelectedLines: () => void;
485
485
  groupSelectedLines: () => void;
486
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
486
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
487
487
  moveSelectedLinesToGroup: (groupId: string) => void;
488
488
  resetToServer: () => void;
489
489
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -945,7 +945,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
945
945
  duplicateLine: (lineId: string) => string | null;
946
946
  duplicateSelectedLines: () => void;
947
947
  groupSelectedLines: () => void;
948
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
948
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
949
949
  moveSelectedLinesToGroup: (groupId: string) => void;
950
950
  resetToServer: () => void;
951
951
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -1407,7 +1407,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
1407
1407
  duplicateLine: (lineId: string) => string | null;
1408
1408
  duplicateSelectedLines: () => void;
1409
1409
  groupSelectedLines: () => void;
1410
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
1410
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
1411
1411
  moveSelectedLinesToGroup: (groupId: string) => void;
1412
1412
  resetToServer: () => void;
1413
1413
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -1869,7 +1869,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
1869
1869
  duplicateLine: (lineId: string) => string | null;
1870
1870
  duplicateSelectedLines: () => void;
1871
1871
  groupSelectedLines: () => void;
1872
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
1872
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
1873
1873
  moveSelectedLinesToGroup: (groupId: string) => void;
1874
1874
  resetToServer: () => void;
1875
1875
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -2331,7 +2331,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
2331
2331
  duplicateLine: (lineId: string) => string | null;
2332
2332
  duplicateSelectedLines: () => void;
2333
2333
  groupSelectedLines: () => void;
2334
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
2334
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemDropIntent | null) => void;
2335
2335
  moveSelectedLinesToGroup: (groupId: string) => void;
2336
2336
  resetToServer: () => void;
2337
2337
  setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
@@ -41,7 +41,7 @@ export declare function useBillingDocumentLineItemsEditor(options: UseBillingDoc
41
41
  duplicateLine: (lineId: string) => string | null;
42
42
  duplicateSelectedLines: () => void;
43
43
  groupSelectedLines: () => void;
44
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
44
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: import('../utils/billingDocumentLineItemsEditor.util.ts').BillingDocumentLineItemDropIntent | null) => void;
45
45
  moveSelectedLinesToGroup: (groupId: string) => void;
46
46
  resetToServer: () => void;
47
47
  setUnitForSelectedLines: (unit: import('../../../../client/index.ts').UnitOfMeasurement) => void;
@@ -4,7 +4,7 @@ import { AnyBillingDocumentDetail } from '../../../../models/billing-document/bi
4
4
  import { BillingDocumentLineItemGroupUpdateForm } from '../../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model.ts';
5
5
  import { BillingDocumentLineItemUpdateForm } from '../../../../models/billing-document/billingDocumentLineItemUpdateForm.model.ts';
6
6
  import { useBillingDocumentLineItemsSelection } from './useBillingDocumentLineItemsSelection.composable.ts';
7
- import { BillingDocumentLineItemEditorMeta, BillingDocumentLineItemEditorRow } from '../utils/billingDocumentLineItemsEditor.util.ts';
7
+ import { BillingDocumentLineItemDropIntent, BillingDocumentLineItemEditorMeta, BillingDocumentLineItemEditorRow } from '../utils/billingDocumentLineItemsEditor.util.ts';
8
8
  interface UseBillingDocumentLineItemsRowMutationsOptions {
9
9
  hasSaveError: Ref<boolean>;
10
10
  isEditable: ComputedRef<boolean>;
@@ -30,7 +30,7 @@ export declare function useBillingDocumentLineItemsRowMutations(options: UseBill
30
30
  duplicateLine: (lineId: string) => string | null;
31
31
  duplicateSelectedLines: () => void;
32
32
  groupSelectedLines: () => void;
33
- moveLineByIndex: (currentIndex: number, targetIndex: number) => void;
33
+ moveLineByIndex: (currentIndex: number, targetIndex: number, dropIntent?: BillingDocumentLineItemDropIntent | null) => void;
34
34
  moveSelectedLinesToGroup: (groupId: string) => void;
35
35
  resetToServer: () => void;
36
36
  setUnitForSelectedLines: (unit: UnitOfMeasurement) => void;
@@ -1,13 +1,15 @@
1
1
  import { ComputedRef, ShallowRef } from 'vue';
2
+ import { BillingDocumentLineItemDropIntent } from '../utils/billingDocumentLineItemsEditor.util.ts';
2
3
  interface UseBillingDocumentLineItemsTableDragOptions {
3
4
  isEditable: ComputedRef<boolean>;
4
- moveLineByIndex: (oldIndex: number, newIndex: number) => void;
5
+ moveLineByIndex: (oldIndex: number, newIndex: number, dropIntent: BillingDocumentLineItemDropIntent | null) => void;
5
6
  saveNow: () => Promise<void>;
6
7
  tbodyRef: Readonly<ShallowRef<HTMLTableSectionElement | null>>;
7
8
  }
8
9
  export declare function useBillingDocumentLineItemsTableDrag(options: UseBillingDocumentLineItemsTableDragOptions): {
9
10
  isDragging: import('vue').Ref<boolean, boolean>;
10
11
  dragVersion: import('vue').Ref<number, number>;
12
+ dropIntent: import('vue').Ref<BillingDocumentLineItemDropIntent | null, BillingDocumentLineItemDropIntent | null>;
11
13
  restart: () => void;
12
14
  };
13
15
  export {};
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  id: string;
3
3
  isDisabled: boolean;
4
+ isRequired?: boolean;
4
5
  isTouched: boolean;
5
6
  align?: 'left' | 'right';
6
7
  as?: 'input' | 'select';
@@ -20,6 +21,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
20
21
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
21
22
  onBlur?: ((event: FocusEvent) => any) | undefined;
22
23
  }>, {
24
+ isRequired: boolean;
23
25
  width: "content" | "full";
24
26
  variant: "ghost" | "outlined";
25
27
  align: "left" | "right";
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  id: string;
3
3
  isDisabled: boolean;
4
+ isRequired?: boolean;
4
5
  isTouched: boolean;
5
6
  errorMessage: string | null;
6
7
  label: string;
@@ -31,6 +31,14 @@ export interface BillingDocumentLineItemEditorLineRow {
31
31
  vatRate: VatRate;
32
32
  }
33
33
  export type BillingDocumentLineItemEditorRow = BillingDocumentLineItemEditorGroupRow | BillingDocumentLineItemEditorLineRow;
34
+ /**
35
+ * Where a dropped row is meant to land when the slot itself cannot say.
36
+ *
37
+ * `group` joins the group the slot borders, `root` keeps the row ungrouped.
38
+ * Callers without a pointer gesture behind them (keyboard, insert indicator)
39
+ * pass `null` and fall back to neighbour inference.
40
+ */
41
+ export type BillingDocumentLineItemDropIntent = 'group' | 'root';
34
42
  export interface BillingDocumentLineItemEditorMeta {
35
43
  currency: Monetary['currency'];
36
44
  documentType: AnyBillingDocumentDetail['type'];
@@ -82,6 +90,17 @@ export declare class BillingDocumentLineItemsEditorUtil {
82
90
  * and ungrouped line.
83
91
  */
84
92
  static normalizeRows(rows: BillingDocumentLineItemEditorRow[]): BillingDocumentLineItemEditorRow[];
93
+ /**
94
+ * Resolves the group a line belongs to once it is inserted at `index`.
95
+ *
96
+ * The slot right after a group's last line is ambiguous by construction: "the
97
+ * new last line inside the group" and "the first line after the group" are the
98
+ * same position in the row list and the same pixel band on screen. Neighbours
99
+ * cannot disambiguate it, so a drop coming from the drag layer carries an
100
+ * explicit `dropIntent`. Without one, the row is appended to the group it
101
+ * borders, which is what the insert indicators and keyboard inserts expect.
102
+ */
103
+ static resolveInsertGroupId(rows: BillingDocumentLineItemEditorRow[], index: number, dropIntent?: BillingDocumentLineItemDropIntent | null): string | null;
85
104
  private static serializeLineFields;
86
105
  static setUnitForSelectedRows(rows: BillingDocumentLineItemEditorRow[], selectedIds: ReadonlySet<string>, unit: UnitOfMeasurement): BillingDocumentLineItemEditorRow[];
87
106
  static setVatRateForSelectedRows(rows: BillingDocumentLineItemEditorRow[], selectedIds: ReadonlySet<string>, vatRate: VatRate): BillingDocumentLineItemEditorRow[];
@@ -0,0 +1,7 @@
1
+ import { ApiError } from '@wisemen/vue-core-api-utils';
2
+ type __VLS_Props = {
3
+ error: ApiError;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wisemen/wise-invoicing-web",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "private": false,
6
6
  "description": "Invoicing frontend package with Vue 3 components, composables and types",
7
7
  "author": "Wisemen",
@@ -31,6 +31,11 @@
31
31
  "files": [
32
32
  "dist"
33
33
  ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/wisemen-digital/wise-invoicing",
37
+ "directory": "packages/web/invoicing"
38
+ },
34
39
  "peerDependencies": {
35
40
  "@tanstack/vue-query": ">=5.0.0",
36
41
  "@vueuse/core": ">=13.0.0",
@@ -1,48 +0,0 @@
1
- import { useI18n as e } from "vue-i18n";
2
- import { computed as t, createCommentVNode as n, createElementBlock as r, createVNode as i, defineComponent as a, openBlock as o, renderSlot as s, unref as c } from "vue";
3
- import { UIText as l } from "@wisemen/vue-core-design-system";
4
- //#region src/ui/data-provider/DataProvider.vue?vue&type=script&setup=true&lang.ts
5
- var u = {
6
- key: 1,
7
- class: "flex h-full items-center justify-center"
8
- }, d = /* @__PURE__ */ a({
9
- __name: "DataProvider",
10
- props: { queries: {} },
11
- setup(a) {
12
- let d = a, f = e(), p = t(() => {
13
- for (let e in d.queries) if (d.queries[e].isLoading.value) return !0;
14
- return !1;
15
- }), m = t(() => {
16
- for (let e in d.queries) {
17
- let t = d.queries[e].result.value;
18
- if (t != null && t.isErr()) return !0;
19
- }
20
- return !1;
21
- }), h = t(() => {
22
- for (let e in d.queries) {
23
- let t = d.queries[e].result.value;
24
- if (t != null && t.isErr()) {
25
- let e = t.getError();
26
- return "errors" in e ? e.errors[0]?.detail ?? f.t("wise_invoicing.common.error") : e.message;
27
- }
28
- }
29
- return f.t("wise_invoicing.common.error");
30
- }), g = t(() => {
31
- for (let e in d.queries) {
32
- let t = d.queries[e].result.value;
33
- if (t == null || t.isErr()) return !1;
34
- }
35
- return !0;
36
- }), _ = t(() => {
37
- let e = {};
38
- for (let t in d.queries) {
39
- let n = t, r = d.queries[n].result.value;
40
- r == null || !r.isOk() || (e[n] = r.getValue());
41
- }
42
- return e;
43
- });
44
- return (e, t) => p.value ? s(e.$slots, "loading", {}, void 0, void 0, 0) : m.value ? (o(), r("div", u, [i(c(l), { text: h.value }, null, 8, ["text"])])) : g.value ? s(e.$slots, "default", { data: _.value }, void 0, void 0, 2) : n("", !0);
45
- }
46
- });
47
- //#endregion
48
- export { d as t };