@wisemen/wise-invoicing-web 0.3.0 → 0.4.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.
- package/dist/{ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js → ApprovalReminderSettingsViewDataProvider-IuReavOR.js} +3 -3
- package/dist/{BillingDocumentDetailViewDataProvider-TJUwMhtn.js → BillingDocumentDetailViewDataProvider-B3I6UIKY.js} +2201 -1728
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-PU9Ldfhs.js → BillingDocumentPdf-rFqmLUPy.js} +226 -219
- package/dist/{CreditNoteDetailViewDataProvider-DOPmal5D.js → CreditNoteDetailViewDataProvider-CQRnG2Fz.js} +42 -42
- package/dist/{CreditNotePdfViewDataProvider-BH7MaReQ.js → CreditNotePdfViewDataProvider-RytwPWH5.js} +2 -2
- package/dist/{CustomFieldValueText-BjRVovZL.js → CustomFieldValueText-DA0aPKwC.js} +2 -2
- package/dist/{DunningCaseDetailViewDataProvider-CW8ijY3H.js → DunningCaseDetailViewDataProvider-BRYbYgTw.js} +65 -65
- package/dist/{DunningCaseOverviewView-Cfo-4VIw.js → DunningCaseOverviewView-D0vScVF1.js} +125 -125
- package/dist/{DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js → DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js} +2 -2
- package/dist/{DunningCaseSendDialog-BYFXJYMM.js → DunningCaseSendDialog-CV66_tMv.js} +8 -8
- package/dist/{InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js → InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-Cjdu9iZC.js → InvoiceApprovalOverviewView-CcMqr2jH.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-CcX8agTF.js → InvoiceApprovalStatusBadge-BJ3Q18bf.js} +4 -4
- package/dist/{InvoiceApproveDialogDataProvider-4wNAetBn.js → InvoiceApproveDialogDataProvider-DaCEHgs0.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-C9O3hXGo.js → InvoiceDetailViewDataProvider-B5uZY8Qy.js} +47 -47
- package/dist/{InvoiceOverviewViewDataProvider-DBdw7FvZ.js → InvoiceOverviewViewDataProvider-BrgmweRE.js} +57 -57
- package/dist/{InvoicePdfView-CvU9bRVd.js → InvoicePdfView-CPEX7E9W.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-CFjHQ58K.js → InvoicePdfViewDataProvider-T4-8A2OD.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-DDv-LdBU.js → InvoicePublicPdfViewDataProvider-BkHZoPSZ.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.js → InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-Kcq7kSSt.js → InvoicingFileUploadProvider-BLBjPKqx.js} +1 -1
- package/dist/{IssuerSettingsViewDataProvider-BuSIVnIl.js → IssuerSettingsViewDataProvider-BStn0jFI.js} +2 -2
- package/dist/{ReminderSettingsViewDataProvider-CH7gSXnj.js → ReminderSettingsViewDataProvider-CjX7afDs.js} +3 -3
- package/dist/{api.util-CkIRZS3h.js → api.util-D6m6OY3_.js} +15 -6
- package/dist/{billingDocumentDetail.transformer-Bfd8geNo.js → billingDocumentDetail.transformer-Da-Nt4bI.js} +37 -29
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +16 -2
- package/dist/client/zod.gen.d.ts +28 -0
- package/dist/{creditNoteDetail.query-tLnfqsEB.js → creditNoteDetail.query-Yb8TdZNm.js} +22 -18
- package/dist/{dist-D5agTXFI.js → dist-BpDuRYDT.js} +132 -132
- package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
- package/dist/{dist-BD7Allff.js → dist-DCbLgB6Y.js} +182 -102
- package/dist/{i18n.lib--mzprLMR.js → i18n.lib-CKs3ExEl.js} +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +33 -32
- package/dist/{invoice.service-B1w16_Md.js → invoice.service-DWDl9XRh.js} +214 -209
- package/dist/{invoiceApproval.service-BHAJmFkU.js → invoiceApproval.service-Fwlxgd9o.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-DohOKR4q.js → invoiceApprovalStatus.util-q-zHLdFV.js} +1 -1
- package/dist/{invoiceCustomer.service-DpVfpQUD.js → invoiceCustomer.service-DOexR54S.js} +2 -2
- package/dist/{invoiceDetail.query-CfyNSXLS.js → invoiceDetail.query-B5w0Vlsy.js} +1 -1
- package/dist/{invoiceIndexCache.util-jHsrFwcA.js → invoiceIndexCache.util-CUlp4R7R.js} +2 -2
- package/dist/{invoicingConfig.composable-COn1rKRf.js → invoicingConfig.composable-DjFexycc.js} +2 -2
- package/dist/{issuerSettings.query-CDFk2GiP.js → issuerSettings.query-BHuLjV9P.js} +1 -1
- package/dist/libs/i18n.lib.d.ts +28 -0
- package/dist/locales/en-US.json.d.ts +14 -0
- package/dist/locales/nl-BE.json.d.ts +14 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.d.ts +15 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentUpdateLines.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/invoicePdf.types.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/utils/invoicePdf.util.d.ts +5 -0
- package/dist/{reminderConfig.query-DSO0ekC_.js → reminderConfig.query-C4J6m4ER.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/apiError.type.d.ts +2 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemDeleteDialog.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsInsertIndicator.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +5 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +17 -0
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +78 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +14 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsKeyboardNav.composable.d.ts +6 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +8 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +16 -3
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +163 -26
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvoiceHasNoLinesError, InvoiceNotEditableError } from '../client/index.ts';
|
|
1
|
+
import { InvoiceHasNoLinesError, InvoiceLineGroupMaxDepthExceededError, InvoiceNotEditableError } from '../client/index.ts';
|
|
2
2
|
import { I18nKey } from '../libs/i18n.lib.ts';
|
|
3
|
-
export type ApiErrorCode = InvoiceHasNoLinesError['code'] | InvoiceNotEditableError['code'];
|
|
3
|
+
export type ApiErrorCode = InvoiceHasNoLinesError['code'] | InvoiceLineGroupMaxDepthExceededError['code'] | InvoiceNotEditableError['code'];
|
|
4
4
|
export declare const API_ERROR_I18N_KEYS: Record<ApiErrorCode, I18nKey>;
|
|
5
5
|
export declare function useApiError(): {
|
|
6
6
|
messages: import('vue').ComputedRef<Record<string, string>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
+
/** Shown instead of the group description, with the option disabled. */
|
|
3
|
+
addGroupDisabledReason?: string | null;
|
|
2
4
|
canAddGroup?: boolean;
|
|
3
5
|
label: string;
|
|
4
6
|
placement?: 'between' | 'end';
|
|
@@ -10,6 +12,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
10
12
|
onAddGroup?: (() => any) | undefined;
|
|
11
13
|
onAddLine?: (() => any) | undefined;
|
|
12
14
|
}>, {
|
|
15
|
+
addGroupDisabledReason: string | null;
|
|
13
16
|
canAddGroup: boolean;
|
|
14
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { BillingDocumentLineItemEditorGroupRow } from './utils/billingDocumentLineItemsEditor.util.ts';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
isCollapsed: boolean;
|
|
4
|
+
isDropTarget?: boolean;
|
|
4
5
|
contentColumnSpan: number;
|
|
5
6
|
group: BillingDocumentLineItemEditorGroupRow;
|
|
6
7
|
total: number | null;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
-
|
|
10
|
+
expand: () => any;
|
|
11
|
+
toggleCollapse: (isRecursive: boolean) => any;
|
|
10
12
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
|
|
13
|
+
onExpand?: (() => any) | undefined;
|
|
14
|
+
onToggleCollapse?: ((isRecursive: boolean) => any) | undefined;
|
|
12
15
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
16
|
declare const _default: typeof __VLS_export;
|
|
14
17
|
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The groups the row sits in, outermost first: one indent step and guide each. */
|
|
3
|
+
ancestorGroupIds: string[];
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: 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>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
2
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
3
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
2
4
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
3
5
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
4
6
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
7
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
5
8
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
6
9
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
7
10
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -9,9 +12,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
9
12
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
10
13
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
11
14
|
mutations: {
|
|
12
|
-
addGroup: (index: number) =>
|
|
15
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
13
16
|
addLine: (index: number) => string;
|
|
14
17
|
addLineAtEnd: () => string;
|
|
18
|
+
addSubgroup: (groupId: string) => string | null;
|
|
15
19
|
applyServerRows: (config?: {
|
|
16
20
|
clearSelection: boolean;
|
|
17
21
|
}) => void;
|
|
@@ -21,16 +25,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
21
25
|
duplicateLine: (lineId: string) => string | null;
|
|
22
26
|
duplicateSelectedLines: () => void;
|
|
23
27
|
groupSelectedLines: () => void;
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
indentRow: (rowId: string) => boolean;
|
|
29
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
30
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
31
|
+
outdentRow: (rowId: string) => boolean;
|
|
26
32
|
resetToServer: () => void;
|
|
27
33
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
28
34
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
35
|
+
ungroupGroup: (groupId: string) => void;
|
|
29
36
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
30
37
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
31
38
|
};
|
|
32
39
|
rows: import('vue').Ref<({
|
|
33
40
|
id: string;
|
|
41
|
+
parentGroupId: string | null;
|
|
34
42
|
sourceGroupUuid: string | null;
|
|
35
43
|
name: string;
|
|
36
44
|
customFields: ({
|
|
@@ -239,6 +247,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
239
247
|
vatRate: import('../../../client').VatRate;
|
|
240
248
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
241
249
|
id: string;
|
|
250
|
+
parentGroupId: string | null;
|
|
242
251
|
sourceGroupUuid: string | null;
|
|
243
252
|
name: string;
|
|
244
253
|
customFields: ({
|
|
@@ -459,11 +468,15 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
459
468
|
toggleAll: () => void;
|
|
460
469
|
toggleRow: (id: string) => void;
|
|
461
470
|
};
|
|
471
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
462
472
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
463
473
|
}) => {
|
|
474
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
475
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
464
476
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
465
477
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
466
478
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
479
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
467
480
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
468
481
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
469
482
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -471,9 +484,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
471
484
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
472
485
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
473
486
|
mutations: {
|
|
474
|
-
addGroup: (index: number) =>
|
|
487
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
475
488
|
addLine: (index: number) => string;
|
|
476
489
|
addLineAtEnd: () => string;
|
|
490
|
+
addSubgroup: (groupId: string) => string | null;
|
|
477
491
|
applyServerRows: (config?: {
|
|
478
492
|
clearSelection: boolean;
|
|
479
493
|
}) => void;
|
|
@@ -483,16 +497,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
483
497
|
duplicateLine: (lineId: string) => string | null;
|
|
484
498
|
duplicateSelectedLines: () => void;
|
|
485
499
|
groupSelectedLines: () => void;
|
|
486
|
-
|
|
487
|
-
|
|
500
|
+
indentRow: (rowId: string) => boolean;
|
|
501
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
502
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
503
|
+
outdentRow: (rowId: string) => boolean;
|
|
488
504
|
resetToServer: () => void;
|
|
489
505
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
490
506
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
507
|
+
ungroupGroup: (groupId: string) => void;
|
|
491
508
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
492
509
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
493
510
|
};
|
|
494
511
|
rows: import('vue').Ref<({
|
|
495
512
|
id: string;
|
|
513
|
+
parentGroupId: string | null;
|
|
496
514
|
sourceGroupUuid: string | null;
|
|
497
515
|
name: string;
|
|
498
516
|
customFields: ({
|
|
@@ -701,6 +719,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
701
719
|
vatRate: import('../../../client').VatRate;
|
|
702
720
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
703
721
|
id: string;
|
|
722
|
+
parentGroupId: string | null;
|
|
704
723
|
sourceGroupUuid: string | null;
|
|
705
724
|
name: string;
|
|
706
725
|
customFields: ({
|
|
@@ -921,11 +940,15 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
921
940
|
toggleAll: () => void;
|
|
922
941
|
toggleRow: (id: string) => void;
|
|
923
942
|
};
|
|
943
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
924
944
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
925
945
|
}, useInjectBillingDocumentLineItemsTableContext: <TFallback extends {
|
|
946
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
947
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
926
948
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
927
949
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
928
950
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
951
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
929
952
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
930
953
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
931
954
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -933,9 +956,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
933
956
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
934
957
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
935
958
|
mutations: {
|
|
936
|
-
addGroup: (index: number) =>
|
|
959
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
937
960
|
addLine: (index: number) => string;
|
|
938
961
|
addLineAtEnd: () => string;
|
|
962
|
+
addSubgroup: (groupId: string) => string | null;
|
|
939
963
|
applyServerRows: (config?: {
|
|
940
964
|
clearSelection: boolean;
|
|
941
965
|
}) => void;
|
|
@@ -945,16 +969,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
945
969
|
duplicateLine: (lineId: string) => string | null;
|
|
946
970
|
duplicateSelectedLines: () => void;
|
|
947
971
|
groupSelectedLines: () => void;
|
|
948
|
-
|
|
949
|
-
|
|
972
|
+
indentRow: (rowId: string) => boolean;
|
|
973
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
974
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
975
|
+
outdentRow: (rowId: string) => boolean;
|
|
950
976
|
resetToServer: () => void;
|
|
951
977
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
952
978
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
979
|
+
ungroupGroup: (groupId: string) => void;
|
|
953
980
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
954
981
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
955
982
|
};
|
|
956
983
|
rows: import('vue').Ref<({
|
|
957
984
|
id: string;
|
|
985
|
+
parentGroupId: string | null;
|
|
958
986
|
sourceGroupUuid: string | null;
|
|
959
987
|
name: string;
|
|
960
988
|
customFields: ({
|
|
@@ -1163,6 +1191,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1163
1191
|
vatRate: import('../../../client').VatRate;
|
|
1164
1192
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
1165
1193
|
id: string;
|
|
1194
|
+
parentGroupId: string | null;
|
|
1166
1195
|
sourceGroupUuid: string | null;
|
|
1167
1196
|
name: string;
|
|
1168
1197
|
customFields: ({
|
|
@@ -1383,11 +1412,15 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1383
1412
|
toggleAll: () => void;
|
|
1384
1413
|
toggleRow: (id: string) => void;
|
|
1385
1414
|
};
|
|
1415
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
1386
1416
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
1387
1417
|
} | null = {
|
|
1418
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
1419
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
1388
1420
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
1389
1421
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
1390
1422
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
1423
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
1391
1424
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
1392
1425
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
1393
1426
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -1395,9 +1428,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1395
1428
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
1396
1429
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
1397
1430
|
mutations: {
|
|
1398
|
-
addGroup: (index: number) =>
|
|
1431
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
1399
1432
|
addLine: (index: number) => string;
|
|
1400
1433
|
addLineAtEnd: () => string;
|
|
1434
|
+
addSubgroup: (groupId: string) => string | null;
|
|
1401
1435
|
applyServerRows: (config?: {
|
|
1402
1436
|
clearSelection: boolean;
|
|
1403
1437
|
}) => void;
|
|
@@ -1407,16 +1441,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1407
1441
|
duplicateLine: (lineId: string) => string | null;
|
|
1408
1442
|
duplicateSelectedLines: () => void;
|
|
1409
1443
|
groupSelectedLines: () => void;
|
|
1410
|
-
|
|
1411
|
-
|
|
1444
|
+
indentRow: (rowId: string) => boolean;
|
|
1445
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
1446
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
1447
|
+
outdentRow: (rowId: string) => boolean;
|
|
1412
1448
|
resetToServer: () => void;
|
|
1413
1449
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
1414
1450
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
1451
|
+
ungroupGroup: (groupId: string) => void;
|
|
1415
1452
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
1416
1453
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
1417
1454
|
};
|
|
1418
1455
|
rows: import('vue').Ref<({
|
|
1419
1456
|
id: string;
|
|
1457
|
+
parentGroupId: string | null;
|
|
1420
1458
|
sourceGroupUuid: string | null;
|
|
1421
1459
|
name: string;
|
|
1422
1460
|
customFields: ({
|
|
@@ -1625,6 +1663,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1625
1663
|
vatRate: import('../../../client').VatRate;
|
|
1626
1664
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
1627
1665
|
id: string;
|
|
1666
|
+
parentGroupId: string | null;
|
|
1628
1667
|
sourceGroupUuid: string | null;
|
|
1629
1668
|
name: string;
|
|
1630
1669
|
customFields: ({
|
|
@@ -1845,11 +1884,15 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1845
1884
|
toggleAll: () => void;
|
|
1846
1885
|
toggleRow: (id: string) => void;
|
|
1847
1886
|
};
|
|
1887
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
1848
1888
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
1849
1889
|
}>(fallback?: TFallback | undefined) => TFallback extends null ? {
|
|
1890
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
1891
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
1850
1892
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
1851
1893
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
1852
1894
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
1895
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
1853
1896
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
1854
1897
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
1855
1898
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -1857,9 +1900,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1857
1900
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
1858
1901
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
1859
1902
|
mutations: {
|
|
1860
|
-
addGroup: (index: number) =>
|
|
1903
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
1861
1904
|
addLine: (index: number) => string;
|
|
1862
1905
|
addLineAtEnd: () => string;
|
|
1906
|
+
addSubgroup: (groupId: string) => string | null;
|
|
1863
1907
|
applyServerRows: (config?: {
|
|
1864
1908
|
clearSelection: boolean;
|
|
1865
1909
|
}) => void;
|
|
@@ -1869,16 +1913,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
1869
1913
|
duplicateLine: (lineId: string) => string | null;
|
|
1870
1914
|
duplicateSelectedLines: () => void;
|
|
1871
1915
|
groupSelectedLines: () => void;
|
|
1872
|
-
|
|
1873
|
-
|
|
1916
|
+
indentRow: (rowId: string) => boolean;
|
|
1917
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
1918
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
1919
|
+
outdentRow: (rowId: string) => boolean;
|
|
1874
1920
|
resetToServer: () => void;
|
|
1875
1921
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
1876
1922
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
1923
|
+
ungroupGroup: (groupId: string) => void;
|
|
1877
1924
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
1878
1925
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
1879
1926
|
};
|
|
1880
1927
|
rows: import('vue').Ref<({
|
|
1881
1928
|
id: string;
|
|
1929
|
+
parentGroupId: string | null;
|
|
1882
1930
|
sourceGroupUuid: string | null;
|
|
1883
1931
|
name: string;
|
|
1884
1932
|
customFields: ({
|
|
@@ -2087,6 +2135,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2087
2135
|
vatRate: import('../../../client').VatRate;
|
|
2088
2136
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
2089
2137
|
id: string;
|
|
2138
|
+
parentGroupId: string | null;
|
|
2090
2139
|
sourceGroupUuid: string | null;
|
|
2091
2140
|
name: string;
|
|
2092
2141
|
customFields: ({
|
|
@@ -2307,11 +2356,15 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2307
2356
|
toggleAll: () => void;
|
|
2308
2357
|
toggleRow: (id: string) => void;
|
|
2309
2358
|
};
|
|
2359
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
2310
2360
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
2311
2361
|
} | null : {
|
|
2362
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
2363
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
2312
2364
|
hasInvalidRows: import('vue').ComputedRef<boolean>;
|
|
2313
2365
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
2314
2366
|
isDirty: import('vue').ComputedRef<boolean>;
|
|
2367
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
2315
2368
|
isEditable: import('vue').ComputedRef<boolean>;
|
|
2316
2369
|
isSaving: import('vue').ComputedRef<boolean>;
|
|
2317
2370
|
customFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
@@ -2319,9 +2372,10 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2319
2372
|
groupCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
2320
2373
|
lineCustomFieldDefinitions: import('vue').ComputedRef<import('../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model').CustomFieldDefinition[]>;
|
|
2321
2374
|
mutations: {
|
|
2322
|
-
addGroup: (index: number) =>
|
|
2375
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
2323
2376
|
addLine: (index: number) => string;
|
|
2324
2377
|
addLineAtEnd: () => string;
|
|
2378
|
+
addSubgroup: (groupId: string) => string | null;
|
|
2325
2379
|
applyServerRows: (config?: {
|
|
2326
2380
|
clearSelection: boolean;
|
|
2327
2381
|
}) => void;
|
|
@@ -2331,16 +2385,20 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2331
2385
|
duplicateLine: (lineId: string) => string | null;
|
|
2332
2386
|
duplicateSelectedLines: () => void;
|
|
2333
2387
|
groupSelectedLines: () => void;
|
|
2334
|
-
|
|
2335
|
-
|
|
2388
|
+
indentRow: (rowId: string) => boolean;
|
|
2389
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
2390
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
2391
|
+
outdentRow: (rowId: string) => boolean;
|
|
2336
2392
|
resetToServer: () => void;
|
|
2337
2393
|
setUnitForSelectedLines: (unit: import('../../../client').UnitOfMeasurement) => void;
|
|
2338
2394
|
setVatRateForSelectedLines: (vatRate: import('../../../client').VatRate) => void;
|
|
2395
|
+
ungroupGroup: (groupId: string) => void;
|
|
2339
2396
|
updateAllFields: (lineId: string, values: import('../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
2340
2397
|
updateGroup: (groupId: string, values: import('../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
2341
2398
|
};
|
|
2342
2399
|
rows: import('vue').Ref<({
|
|
2343
2400
|
id: string;
|
|
2401
|
+
parentGroupId: string | null;
|
|
2344
2402
|
sourceGroupUuid: string | null;
|
|
2345
2403
|
name: string;
|
|
2346
2404
|
customFields: ({
|
|
@@ -2549,6 +2607,7 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2549
2607
|
vatRate: import('../../../client').VatRate;
|
|
2550
2608
|
})[], import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorRow[] | ({
|
|
2551
2609
|
id: string;
|
|
2610
|
+
parentGroupId: string | null;
|
|
2552
2611
|
sourceGroupUuid: string | null;
|
|
2553
2612
|
name: string;
|
|
2554
2613
|
customFields: ({
|
|
@@ -2769,5 +2828,6 @@ export declare const useProvideBillingDocumentLineItemsTableContext: (context: {
|
|
|
2769
2828
|
toggleAll: () => void;
|
|
2770
2829
|
toggleRow: (id: string) => void;
|
|
2771
2830
|
};
|
|
2831
|
+
structure: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemsStructure>;
|
|
2772
2832
|
meta: import('vue').ComputedRef<import('./utils/billingDocumentLineItemsEditor.util').BillingDocumentLineItemEditorMeta>;
|
|
2773
2833
|
};
|
package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ComputedRef } from 'vue';
|
|
|
3
3
|
import { AnyBillingDocumentDetail } from '../../../../models/billing-document/billingDocumentDetail.model.ts';
|
|
4
4
|
import { BillingDocumentUpdateLines } from '../../../../models/billing-document/billingDocumentUpdateLines.model.ts';
|
|
5
5
|
import { CustomFieldDefinition } from '../../../../modules/custom-field/models/custom-field-definition/customFieldDefinition.model.ts';
|
|
6
|
-
import { BillingDocumentLineItemEditorMeta, BillingDocumentLineItemEditorRow } from '../utils/billingDocumentLineItemsEditor.util.ts';
|
|
6
|
+
import { BillingDocumentLineItemEditorMeta, BillingDocumentLineItemEditorRow, BillingDocumentLineItemsStructure } from '../utils/billingDocumentLineItemsEditor.util.ts';
|
|
7
7
|
interface UseBillingDocumentLineItemsEditorOptions {
|
|
8
8
|
isSaving: ComputedRef<boolean>;
|
|
9
9
|
billingDocument: () => AnyBillingDocumentDetail;
|
|
@@ -19,9 +19,12 @@ export interface BillingDocumentLineItemsEditorDisplayRow {
|
|
|
19
19
|
vat: number | null;
|
|
20
20
|
}
|
|
21
21
|
export declare function useBillingDocumentLineItemsEditor(options: UseBillingDocumentLineItemsEditorOptions): {
|
|
22
|
+
dropTargetGroupId: import('vue').Ref<string | null, string | null>;
|
|
23
|
+
hoveredGroupId: import('vue').Ref<string | null, string | null>;
|
|
22
24
|
hasInvalidRows: ComputedRef<boolean>;
|
|
23
25
|
hasSaveError: import('vue').Ref<boolean, boolean>;
|
|
24
26
|
isDirty: ComputedRef<boolean>;
|
|
27
|
+
isDraggingRows: import('vue').Ref<boolean, boolean>;
|
|
25
28
|
isEditable: ComputedRef<boolean>;
|
|
26
29
|
isSaving: ComputedRef<boolean>;
|
|
27
30
|
customFieldDefinitions: ComputedRef<CustomFieldDefinition[]>;
|
|
@@ -29,9 +32,10 @@ export declare function useBillingDocumentLineItemsEditor(options: UseBillingDoc
|
|
|
29
32
|
groupCustomFieldDefinitions: ComputedRef<CustomFieldDefinition[]>;
|
|
30
33
|
lineCustomFieldDefinitions: ComputedRef<CustomFieldDefinition[]>;
|
|
31
34
|
mutations: {
|
|
32
|
-
addGroup: (index: number) =>
|
|
35
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
33
36
|
addLine: (index: number) => string;
|
|
34
37
|
addLineAtEnd: () => string;
|
|
38
|
+
addSubgroup: (groupId: string) => string | null;
|
|
35
39
|
applyServerRows: (config?: {
|
|
36
40
|
clearSelection: boolean;
|
|
37
41
|
}) => void;
|
|
@@ -41,16 +45,20 @@ export declare function useBillingDocumentLineItemsEditor(options: UseBillingDoc
|
|
|
41
45
|
duplicateLine: (lineId: string) => string | null;
|
|
42
46
|
duplicateSelectedLines: () => void;
|
|
43
47
|
groupSelectedLines: () => void;
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
indentRow: (rowId: string) => boolean;
|
|
49
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
50
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
51
|
+
outdentRow: (rowId: string) => boolean;
|
|
46
52
|
resetToServer: () => void;
|
|
47
53
|
setUnitForSelectedLines: (unit: import('../../../../client/index.ts').UnitOfMeasurement) => void;
|
|
48
54
|
setVatRateForSelectedLines: (vatRate: import('../../../../client/index.ts').VatRate) => void;
|
|
55
|
+
ungroupGroup: (groupId: string) => void;
|
|
49
56
|
updateAllFields: (lineId: string, values: import('../../../../models/billing-document/billingDocumentLineItemUpdateForm.model').BillingDocumentLineItemUpdateForm) => void;
|
|
50
57
|
updateGroup: (groupId: string, values: import('../../../../models/billing-document/billingDocumentLineItemGroupUpdateForm.model').BillingDocumentLineItemGroupUpdateForm) => void;
|
|
51
58
|
};
|
|
52
59
|
rows: import('vue').Ref<({
|
|
53
60
|
id: string;
|
|
61
|
+
parentGroupId: string | null;
|
|
54
62
|
sourceGroupUuid: string | null;
|
|
55
63
|
name: string;
|
|
56
64
|
customFields: ({
|
|
@@ -259,6 +267,7 @@ export declare function useBillingDocumentLineItemsEditor(options: UseBillingDoc
|
|
|
259
267
|
vatRate: import('../../../../client/index.ts').VatRate;
|
|
260
268
|
})[], BillingDocumentLineItemEditorRow[] | ({
|
|
261
269
|
id: string;
|
|
270
|
+
parentGroupId: string | null;
|
|
262
271
|
sourceGroupUuid: string | null;
|
|
263
272
|
name: string;
|
|
264
273
|
customFields: ({
|
|
@@ -479,6 +488,7 @@ export declare function useBillingDocumentLineItemsEditor(options: UseBillingDoc
|
|
|
479
488
|
toggleAll: () => void;
|
|
480
489
|
toggleRow: (id: string) => void;
|
|
481
490
|
};
|
|
491
|
+
structure: ComputedRef<BillingDocumentLineItemsStructure>;
|
|
482
492
|
meta: ComputedRef<BillingDocumentLineItemEditorMeta>;
|
|
483
493
|
};
|
|
484
494
|
export {};
|
|
@@ -22,6 +22,10 @@ export type BillingDocumentLineItemsNavAction = {
|
|
|
22
22
|
type: 'deleteEmpty';
|
|
23
23
|
} | {
|
|
24
24
|
type: 'duplicate';
|
|
25
|
+
} | {
|
|
26
|
+
type: 'indent';
|
|
27
|
+
} | {
|
|
28
|
+
type: 'outdent';
|
|
25
29
|
} | null;
|
|
26
30
|
/**
|
|
27
31
|
* Pure keyboard-navigation decision for the line-items grid. Kept free of DOM
|
|
@@ -33,6 +37,8 @@ interface UseBillingDocumentLineItemsKeyboardNavOptions {
|
|
|
33
37
|
addLineBelow: (rowId: string) => string | null;
|
|
34
38
|
deleteEmptyLine: (rowId: string) => string | null;
|
|
35
39
|
duplicateLine: (rowId: string) => string | null;
|
|
40
|
+
indentRow: (rowId: string) => boolean;
|
|
41
|
+
outdentRow: (rowId: string) => boolean;
|
|
36
42
|
tbodyRef: Readonly<ShallowRef<HTMLTableSectionElement | null>>;
|
|
37
43
|
}
|
|
38
44
|
export declare function useBillingDocumentLineItemsKeyboardNav(options: UseBillingDocumentLineItemsKeyboardNavOptions): {
|
|
@@ -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 {
|
|
7
|
+
import { BillingDocumentLineItemEditorMeta, BillingDocumentLineItemEditorRow } from '../utils/billingDocumentLineItemsEditor.util.ts';
|
|
8
8
|
interface UseBillingDocumentLineItemsRowMutationsOptions {
|
|
9
9
|
hasSaveError: Ref<boolean>;
|
|
10
10
|
isEditable: ComputedRef<boolean>;
|
|
@@ -18,9 +18,10 @@ export interface DeleteGroupOptions {
|
|
|
18
18
|
deleteLines: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare function useBillingDocumentLineItemsRowMutations(options: UseBillingDocumentLineItemsRowMutationsOptions): {
|
|
21
|
-
addGroup: (index: number) =>
|
|
21
|
+
addGroup: (index: number, parentGroupId?: string | null) => string;
|
|
22
22
|
addLine: (index: number) => string;
|
|
23
23
|
addLineAtEnd: () => string;
|
|
24
|
+
addSubgroup: (groupId: string) => string | null;
|
|
24
25
|
applyServerRows: (config?: {
|
|
25
26
|
clearSelection: boolean;
|
|
26
27
|
}) => void;
|
|
@@ -30,11 +31,14 @@ export declare function useBillingDocumentLineItemsRowMutations(options: UseBill
|
|
|
30
31
|
duplicateLine: (lineId: string) => string | null;
|
|
31
32
|
duplicateSelectedLines: () => void;
|
|
32
33
|
groupSelectedLines: () => void;
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
indentRow: (rowId: string) => boolean;
|
|
35
|
+
moveLineByIndex: (currentIndex: number, targetIndex: number, levelOffset?: number, collapsedGroupIds?: ReadonlySet<string>) => void;
|
|
36
|
+
moveSelectedLinesToGroup: (groupId: string | null) => void;
|
|
37
|
+
outdentRow: (rowId: string) => boolean;
|
|
35
38
|
resetToServer: () => void;
|
|
36
39
|
setUnitForSelectedLines: (unit: UnitOfMeasurement) => void;
|
|
37
40
|
setVatRateForSelectedLines: (vatRate: VatRate) => void;
|
|
41
|
+
ungroupGroup: (groupId: string) => void;
|
|
38
42
|
updateAllFields: (lineId: string, values: BillingDocumentLineItemUpdateForm) => void;
|
|
39
43
|
updateGroup: (groupId: string, values: BillingDocumentLineItemGroupUpdateForm) => void;
|
|
40
44
|
};
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import { ComputedRef, ShallowRef } from 'vue';
|
|
2
|
-
|
|
2
|
+
/** Where the dragged row would land if it were dropped now, in visible indices. */
|
|
3
|
+
export interface BillingDocumentLineItemsDragTarget {
|
|
4
|
+
fromIndex: number;
|
|
5
|
+
levelOffset: number;
|
|
6
|
+
toIndex: number;
|
|
7
|
+
}
|
|
3
8
|
interface UseBillingDocumentLineItemsTableDragOptions {
|
|
4
9
|
isEditable: ComputedRef<boolean>;
|
|
5
|
-
moveLineByIndex: (oldIndex: number, newIndex: number,
|
|
10
|
+
moveLineByIndex: (oldIndex: number, newIndex: number, levelOffset: number) => void;
|
|
6
11
|
saveNow: () => Promise<void>;
|
|
7
12
|
tbodyRef: Readonly<ShallowRef<HTMLTableSectionElement | null>>;
|
|
8
13
|
}
|
|
9
14
|
export declare function useBillingDocumentLineItemsTableDrag(options: UseBillingDocumentLineItemsTableDragOptions): {
|
|
10
15
|
isDragging: import('vue').Ref<boolean, boolean>;
|
|
16
|
+
dragTarget: import('vue').Ref<{
|
|
17
|
+
fromIndex: number;
|
|
18
|
+
levelOffset: number;
|
|
19
|
+
toIndex: number;
|
|
20
|
+
} | null, BillingDocumentLineItemsDragTarget | {
|
|
21
|
+
fromIndex: number;
|
|
22
|
+
levelOffset: number;
|
|
23
|
+
toIndex: number;
|
|
24
|
+
} | null>;
|
|
11
25
|
dragVersion: import('vue').Ref<number, number>;
|
|
12
|
-
dropIntent: import('vue').Ref<BillingDocumentLineItemDropIntent | null, BillingDocumentLineItemDropIntent | null>;
|
|
13
26
|
restart: () => void;
|
|
14
27
|
};
|
|
15
28
|
export {};
|