@wisemen/wise-invoicing-web 0.0.3 → 0.0.5
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/{BillingDocumentDetailViewDataProvider-CwonTh2r.js → BillingDocumentDetailViewDataProvider-DdaNbuI2.js} +1085 -995
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-GWCCjE6F.js → BillingDocumentPdf-D_NOfBhQ.js} +10 -10
- package/dist/{CreditNoteDetailViewDataProvider-CaucKK9o.js → CreditNoteDetailViewDataProvider-5ljhBOoN.js} +181 -181
- package/dist/{CreditNotePdfViewDataProvider-CDkvm-3m.js → CreditNotePdfViewDataProvider-CiWZN7Zy.js} +3 -3
- package/dist/{CustomFieldValueText-CC9spLWf.js → CustomFieldValueText-ne5yy02J.js} +2 -2
- package/dist/DataProvider-Dj34ljUX.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-1Ui9yqUb.js → DunningCaseDetailViewDataProvider-CetbSmjq.js} +136 -130
- package/dist/DunningCaseOverviewView-Bq0BKVXG.js +747 -0
- package/dist/{DunningCaseReminderPdfViewDataProvider-CVnr9ge6.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +5 -2
- package/dist/DunningCaseSendDialog-C47X_JjC.js +349 -0
- package/dist/InvoiceDetailViewDataProvider-DYH2ODDi.js +1670 -0
- package/dist/{InvoiceOverviewViewDataProvider-CNK7H5r2.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +504 -440
- package/dist/{InvoicePdfView-CrWU8Xa-.js → InvoicePdfView-ug0BiMqe.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-nHZoeRxn.js → InvoicePdfViewDataProvider-WvjMiEZG.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-CXWSg2pq.js → InvoicePublicPdfViewDataProvider-BI9RQqYp.js} +3 -3
- package/dist/{IssuerSettingsViewDataProvider-DcA6rgOJ.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
- package/dist/ReminderSettingsViewDataProvider-5n2EfxPG.js +711 -0
- package/dist/{api.util-Dm_TQedZ.js → api.util-BCSgCfpS.js} +528 -509
- package/dist/{billingDocumentDetail.transformer-tmy9Tf_b.js → billingDocumentDetail.transformer-DIKAl4_L.js} +58 -89
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +28 -5
- package/dist/client/zod.gen.d.ts +869 -623
- package/dist/composables/invoicingConfig.composable.d.ts +0 -2
- package/dist/{creditNoteDetail.query-BM2saU0n.js → creditNoteDetail.query-DHP69UiB.js} +13 -13
- package/dist/{dist-DP8KNFVD.js → dist-D9lp7NDv.js} +20 -36
- package/dist/{dist-DJ8yJcb9.js → dist-PErDVE6-.js} +621 -671
- package/dist/{documentTitle.composable-D7XA-8iJ.js → documentTitle.composable-4ApFl9TZ.js} +22 -22
- package/dist/{invoicingConfig.composable-AjojW4qE.js → i18n.lib-B74GKndD.js} +58 -66
- package/dist/index.d.ts +51 -0
- package/dist/index.js +174 -175
- package/dist/{invoice.service-PsmVGGTR.js → invoice.service-DG5eacZC.js} +35 -35
- package/dist/{invoiceDeliveryStatus.util-CL8K78pD.js → invoiceDeliveryStatus.util-CX-IdqAu.js} +4 -4
- package/dist/{invoiceDetail.query-D2eFdE0j.js → invoiceDetail.query-C_IMGjOX.js} +1 -1
- package/dist/invoicingConfig.composable-BYqn1I9n.js +60 -0
- package/dist/{issuerSettings.query-d5i7Wd7j.js → issuerSettings.query-6wnSPphB.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +50 -0
- package/dist/locales/en-US.json.d.ts +25 -0
- package/dist/locales/nl-BE.json.d.ts +25 -0
- package/dist/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.d.ts +9 -3
- package/dist/modules/dunning-case/actions/dunningCase.actions.d.ts +12 -0
- package/dist/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.d.ts +1 -0
- package/dist/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.d.ts +1 -0
- package/dist/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.d.ts +2 -0
- package/dist/modules/dunning-case/api/queries/dunningCaseIndex.query.d.ts +0 -1
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +12 -2
- package/dist/modules/dunning-case/models/reminderConfigForm.model.d.ts +3 -1
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewCustomerCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewDaysOverdueCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLastReminderCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLevelCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewOutstandingCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewReminderCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewLastReminderCell.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewReminderCell.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +24 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendStat.vue.d.ts +9 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendSummary.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendFeeRow.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceRow.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceSummary.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/components/DunningCaseSendRecipientAlert.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/send/composables/dunningCaseReminderSubject.composable.d.ts +6 -0
- package/dist/modules/dunning-case/use-cases/send/composables/dunningCaseSendRecipient.composable.d.ts +16 -0
- package/dist/modules/dunning-case/use-cases/send/dialogs/dunningCaseBulkSendDialog.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/send/utils/dunningCaseSend.util.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderFeeNotice.vue.d.ts +3 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderPanel.vue.d.ts +12 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +28 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderTimeline.vue.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderTemplateTabs.vue.d.ts +20 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderTemplatesPanel.vue.d.ts +24 -0
- package/dist/modules/dunning-case/use-cases/settings/components/reminderLadderFeeNotice.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +43 -0
- package/dist/modules/invoice/api/invoiceIndexCache.util.d.ts +4 -4
- package/dist/modules/invoice/api/queries/invoiceUserSearch.query.d.ts +3 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +8 -0
- package/dist/modules/invoice/api/services/invoiceUser.service.d.ts +6 -0
- package/dist/modules/invoice/components/form/InvoiceFormPreparedByField.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/update/invoicePreparer.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/update/invoicePreparer.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Dfe5r84P.js} +32 -1
- package/dist/{reminderConfig.query-C7I3M2pu.js → reminderConfig.query-B9OQY7IT.js} +56 -54
- package/dist/search.composable-BCtYqudV.js +52 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +6 -6
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +1 -1
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +2 -2
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.spec.d.ts +1 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +3 -1
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +2 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +19 -0
- package/dist/ui/data-provider/DataProviderErrorState.vue.d.ts +7 -0
- package/dist/ui/data-provider/dataProviderErrorState.spec.d.ts +1 -0
- package/package.json +6 -1
- package/dist/DataProvider-CfHLB3rH.js +0 -48
- package/dist/DunningCaseOverviewView-Bvwaj4_y.js +0 -507
- package/dist/InvoiceDetailViewDataProvider-DfRDFCEb.js +0 -1578
- package/dist/PermissionGuard-DDw-lDGL.js +0 -301
- package/dist/ReminderSettingsViewDataProvider-C4qz2Rli.js +0 -502
- package/dist/composables/permission-guard/permissionGuard.composable.d.ts +0 -4
- package/dist/ui/permission-guard/PermissionGuard.vue.d.ts +0 -22
- /package/dist/modules/dunning-case/{api/queries/dunningCaseIndex.query.spec.d.ts → use-cases/overview/components/dunningCaseOverviewActionsCell.spec.d.ts} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { l as e, m as t, s as n, t as r } from "./api.util-BCSgCfpS.js";
|
|
2
|
+
import { C as i, S as a, _ as o, g as s, h as c, i as l, l as u, n as d, o as f, r as p, s as m, t as h } from "./documentTitle.composable-4ApFl9TZ.js";
|
|
3
|
+
import { n as g, r as _, t as v } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { r as y, t as b } from "./invoice.service-DG5eacZC.js";
|
|
5
|
+
import { n as x } from "./plainDate.transformer-Dfe5r84P.js";
|
|
6
|
+
import { n as ee } from "./invoicingConfig.composable-BYqn1I9n.js";
|
|
7
7
|
import { n as te } from "./address.transformer-B8C0pwT1.js";
|
|
8
|
-
import { A as
|
|
8
|
+
import { A as S, B as C, E as ne, F as re, H as ie, J as ae, K as oe, M as se, N as ce, P as le, R as ue, Y as de, _ as fe, b as pe, et as me, f as he, k as ge, m as _e, n as ve, o as ye, p as be, r as xe, s as Se, t as Ce, tt as we, u as Te, w as Ee, y as De, z as Oe } from "./dist-D9lp7NDv.js";
|
|
9
9
|
import { n as ke } from "./dist-YTXTCfo1.js";
|
|
10
|
-
import { n as Ae, t as je } from "./CustomFieldValueText-
|
|
11
|
-
import { t as Me } from "./DataProvider-
|
|
10
|
+
import { n as Ae, t as je } from "./CustomFieldValueText-ne5yy02J.js";
|
|
11
|
+
import { t as Me } from "./DataProvider-Dj34ljUX.js";
|
|
12
12
|
import { t as Ne } from "./formango.util-D5c2ql--.js";
|
|
13
13
|
import { t as Pe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
14
14
|
import { t as Fe } from "./dashboard-BaWGNEek.js";
|
|
15
|
-
import { n as Ie, r as Le, t as Re } from "./BillingDocumentPdf-
|
|
15
|
+
import { n as Ie, r as Le, t as Re } from "./BillingDocumentPdf-D_NOfBhQ.js";
|
|
16
16
|
import { useViewModels as ze } from "@wisemen/vue-core-actions";
|
|
17
17
|
import { RouterLink as Be, useRouter as Ve } from "vue-router";
|
|
18
18
|
import He, { z as w } from "zod";
|
|
@@ -40,26 +40,26 @@ function bn(e) {
|
|
|
40
40
|
var xn = class {
|
|
41
41
|
value;
|
|
42
42
|
colorMap = /* @__PURE__ */ new Map([
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
43
|
+
[c.CREDITED, "success"],
|
|
44
|
+
[c.DRAFT, "gray"],
|
|
45
|
+
[c.FINALIZED, "brand"],
|
|
46
|
+
[c.OVERDUE, "error"],
|
|
47
|
+
[c.OVERPAID, "warning"],
|
|
48
|
+
[c.PAID, "success"],
|
|
49
|
+
[c.PROTESTED, "warning"],
|
|
50
|
+
[c.READY, "blue"],
|
|
51
|
+
[c.SENT, "purple"]
|
|
52
52
|
]);
|
|
53
53
|
i18nKeyMap = /* @__PURE__ */ new Map([
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
54
|
+
[c.CREDITED, "wise_invoicing.invoice.status.credited"],
|
|
55
|
+
[c.DRAFT, "wise_invoicing.invoice.status.draft"],
|
|
56
|
+
[c.FINALIZED, "wise_invoicing.invoice.status.finalized"],
|
|
57
|
+
[c.OVERDUE, "wise_invoicing.invoice.status.overdue"],
|
|
58
|
+
[c.OVERPAID, "wise_invoicing.invoice.status.overpaid"],
|
|
59
|
+
[c.PAID, "wise_invoicing.invoice.status.paid"],
|
|
60
|
+
[c.PROTESTED, "wise_invoicing.invoice.status.protested"],
|
|
61
|
+
[c.READY, "wise_invoicing.invoice.status.ready"],
|
|
62
|
+
[c.SENT, "wise_invoicing.invoice.status.sent"]
|
|
63
63
|
]);
|
|
64
64
|
constructor(e) {
|
|
65
65
|
this.value = e;
|
|
@@ -70,39 +70,39 @@ var xn = class {
|
|
|
70
70
|
get translationKey() {
|
|
71
71
|
return this.i18nKeyMap.get(this.value) ?? "wise_invoicing.invoice.status.draft";
|
|
72
72
|
}
|
|
73
|
-
}, Sn = new Set(Object.values(
|
|
73
|
+
}, Sn = new Set(Object.values(o)), Cn = class i {
|
|
74
74
|
static async confirmUpload(e, t) {
|
|
75
|
-
let
|
|
75
|
+
let i = await r.fromPromise(n({
|
|
76
76
|
body: { blurHash: t },
|
|
77
77
|
path: { file: e }
|
|
78
78
|
}));
|
|
79
|
-
return
|
|
79
|
+
return r.void(i);
|
|
80
80
|
}
|
|
81
81
|
static async getDownloadUrl(e) {
|
|
82
|
-
let
|
|
82
|
+
let n = await t({
|
|
83
83
|
parseAs: "blob",
|
|
84
84
|
responseStyle: "fields",
|
|
85
85
|
path: { file: e }
|
|
86
86
|
});
|
|
87
|
-
return
|
|
87
|
+
return n.data === void 0 ? null : n.response.url;
|
|
88
88
|
}
|
|
89
|
-
static async getFileInfo(
|
|
90
|
-
return (await
|
|
91
|
-
name:
|
|
92
|
-
mimeType:
|
|
89
|
+
static async getFileInfo(t, n) {
|
|
90
|
+
return (await r.fromPromise(e({ body: {
|
|
91
|
+
name: t,
|
|
92
|
+
mimeType: i.normalizeMimeType(n)
|
|
93
93
|
} }))).map((e) => ({
|
|
94
94
|
uuid: e.data.uuid,
|
|
95
95
|
uploadUrl: e.data.uploadUrl
|
|
96
96
|
}));
|
|
97
97
|
}
|
|
98
98
|
static normalizeMimeType(e) {
|
|
99
|
-
return Sn.has(e) ? e :
|
|
99
|
+
return Sn.has(e) ? e : o.APPLICATION_OCTET_STREAM;
|
|
100
100
|
}
|
|
101
|
-
static preprocess(
|
|
102
|
-
let
|
|
103
|
-
return
|
|
104
|
-
lastModified:
|
|
105
|
-
type:
|
|
101
|
+
static preprocess(e) {
|
|
102
|
+
let t = i.normalizeMimeType(e.type);
|
|
103
|
+
return e.type === t ? Promise.resolve(e) : Promise.resolve(new File([e], e.name, {
|
|
104
|
+
lastModified: e.lastModified,
|
|
105
|
+
type: t
|
|
106
106
|
}));
|
|
107
107
|
}
|
|
108
108
|
}, wn = "wise-invoicing.billing-document.finalize-confirmation.skip";
|
|
@@ -264,7 +264,7 @@ var En = /* @__PURE__ */ N({
|
|
|
264
264
|
return (e, t) => (F(), O(R(B), { class: "gap-sm" }, {
|
|
265
265
|
default: z(() => [
|
|
266
266
|
M(R(Dt), {
|
|
267
|
-
"icon-left": R(
|
|
267
|
+
"icon-left": R(ge),
|
|
268
268
|
label: n.isPdfViewActive ? R(i).t("wise_invoicing.common.view_details") : R(i).t("wise_invoicing.common.view_pdf"),
|
|
269
269
|
size: "md",
|
|
270
270
|
variant: "secondary",
|
|
@@ -294,7 +294,7 @@ var En = /* @__PURE__ */ N({
|
|
|
294
294
|
]))), 128)),
|
|
295
295
|
a.value ? (F(), O(R(Vt), { key: 0 }, {
|
|
296
296
|
trigger: z(() => [M(R(Yt), {
|
|
297
|
-
icon: R(
|
|
297
|
+
icon: R(me),
|
|
298
298
|
label: R(i).t("wise_invoicing.invoice.detail.header.actions_more"),
|
|
299
299
|
variant: "tertiary"
|
|
300
300
|
}, null, 8, ["icon", "label"])]),
|
|
@@ -390,11 +390,11 @@ var En = /* @__PURE__ */ N({
|
|
|
390
390
|
}
|
|
391
391
|
function c(e) {
|
|
392
392
|
if (e !== void 0 && (e.uuid !== t.currentBillingDocument.uuid || e.role !== t.currentBillingDocument.role)) switch (e.role) {
|
|
393
|
-
case
|
|
393
|
+
case p.INVOICE: return {
|
|
394
394
|
name: "invoicing-invoice-detail",
|
|
395
395
|
params: { invoiceUuid: e.uuid }
|
|
396
396
|
};
|
|
397
|
-
case
|
|
397
|
+
case p.CREDIT_NOTE: return {
|
|
398
398
|
name: "invoicing-credit-note-detail",
|
|
399
399
|
params: { creditNoteUuid: e.uuid }
|
|
400
400
|
};
|
|
@@ -406,29 +406,29 @@ var En = /* @__PURE__ */ N({
|
|
|
406
406
|
variant: "text"
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function f(e, t) {
|
|
410
410
|
let n = {
|
|
411
411
|
text: e,
|
|
412
412
|
variant: "emphasis"
|
|
413
413
|
};
|
|
414
414
|
return t !== void 0 && (n.to = t), n;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
let t = s(e,
|
|
418
|
-
return
|
|
416
|
+
function m(e) {
|
|
417
|
+
let t = s(e, p.INVOICE);
|
|
418
|
+
return f(t?.label ?? r.t("wise_invoicing.invoice.detail.activity_log.draft_invoice"), c(t));
|
|
419
419
|
}
|
|
420
420
|
function h(e) {
|
|
421
|
-
let t = s(e,
|
|
422
|
-
return
|
|
421
|
+
let t = s(e, p.CREDIT_NOTE);
|
|
422
|
+
return f(t?.label ?? r.t("wise_invoicing.invoice.detail.activity_log.draft_credit"), c(t));
|
|
423
423
|
}
|
|
424
424
|
function g(e) {
|
|
425
425
|
switch (e.action) {
|
|
426
|
-
case l.INVOICE_CREATED: return [
|
|
427
|
-
case l.INVOICE_UPDATED: return [
|
|
428
|
-
case l.INVOICE_FINALIZED: return [
|
|
429
|
-
case l.INVOICE_SENT: return [
|
|
426
|
+
case l.INVOICE_CREATED: return [m(e.entities), u(r.t("wise_invoicing.invoice.detail.activity_log.action.invoice_created"))];
|
|
427
|
+
case l.INVOICE_UPDATED: return [m(e.entities), u(r.t("wise_invoicing.invoice.detail.activity_log.action.invoice_updated"))];
|
|
428
|
+
case l.INVOICE_FINALIZED: return [m(e.entities), u(r.t("wise_invoicing.invoice.detail.activity_log.action.invoice_finalized"))];
|
|
429
|
+
case l.INVOICE_SENT: return [m(e.entities), u(r.t("wise_invoicing.invoice.detail.activity_log.action.invoice_sent"))];
|
|
430
430
|
case l.CREDIT_NOTE_CREATED: return [
|
|
431
|
-
|
|
431
|
+
m(e.entities),
|
|
432
432
|
u(r.t("wise_invoicing.invoice.detail.activity_log.action.credit_note_created")),
|
|
433
433
|
h(e.entities)
|
|
434
434
|
];
|
|
@@ -437,16 +437,16 @@ var En = /* @__PURE__ */ N({
|
|
|
437
437
|
}
|
|
438
438
|
function _(e) {
|
|
439
439
|
switch (e.action) {
|
|
440
|
-
case l.INVOICE_FINALIZED: return
|
|
441
|
-
case l.INVOICE_SENT: return
|
|
440
|
+
case l.INVOICE_FINALIZED: return re;
|
|
441
|
+
case l.INVOICE_SENT: return we;
|
|
442
442
|
case l.INVOICE_UPDATED:
|
|
443
|
-
case l.CREDIT_NOTE_UPDATED: return
|
|
444
|
-
case l.CREDIT_NOTE_CREATED: return
|
|
445
|
-
case l.INVOICE_CREATED: return
|
|
443
|
+
case l.CREDIT_NOTE_UPDATED: return ce;
|
|
444
|
+
case l.CREDIT_NOTE_CREATED: return ie;
|
|
445
|
+
case l.INVOICE_CREATED: return C;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
function v(e) {
|
|
449
|
-
return e.actorType ===
|
|
449
|
+
return e.actorType === d.USER && e.actor !== null && ([e.actor.firstName, e.actor.lastName].filter(Boolean).join(" ") || e.actor.email) || r.t("wise_invoicing.invoice.detail.activity_log.actor.system");
|
|
450
450
|
}
|
|
451
451
|
function y(e) {
|
|
452
452
|
return i.toDateTime(e.createdAt);
|
|
@@ -542,7 +542,7 @@ var En = /* @__PURE__ */ N({
|
|
|
542
542
|
__name: "BillingDocumentDetailSidebarOriginalInvoiceSection",
|
|
543
543
|
props: { originalInvoice: {} },
|
|
544
544
|
setup(e) {
|
|
545
|
-
let t = e, n = T(), r =
|
|
545
|
+
let t = e, n = T(), r = _(), i = D(() => {
|
|
546
546
|
if (t.originalInvoice === null) return null;
|
|
547
547
|
let e = new xn(t.originalInvoice.status);
|
|
548
548
|
return {
|
|
@@ -560,7 +560,7 @@ var En = /* @__PURE__ */ N({
|
|
|
560
560
|
isOpenByDefault: !1,
|
|
561
561
|
badge: {
|
|
562
562
|
color: "brand",
|
|
563
|
-
icon: R(
|
|
563
|
+
icon: R(S),
|
|
564
564
|
label: i.value.sequence ?? R(n).t("wise_invoicing.invoice.detail.parent_invoice.untitled"),
|
|
565
565
|
variant: "translucent"
|
|
566
566
|
}
|
|
@@ -592,7 +592,7 @@ var En = /* @__PURE__ */ N({
|
|
|
592
592
|
M(R(Et), {
|
|
593
593
|
label: i.value.statusLabel,
|
|
594
594
|
color: i.value.statusColor,
|
|
595
|
-
icon: R(
|
|
595
|
+
icon: R(be),
|
|
596
596
|
size: "sm",
|
|
597
597
|
variant: "translucent"
|
|
598
598
|
}, null, 8, [
|
|
@@ -626,7 +626,7 @@ var En = /* @__PURE__ */ N({
|
|
|
626
626
|
//#region src/modules/invoice/api/mutations/invoiceUpdateAttachments.mutation.ts
|
|
627
627
|
function Hn() {
|
|
628
628
|
return vt({
|
|
629
|
-
queryFn: (e) =>
|
|
629
|
+
queryFn: (e) => b.updateAttachments(e.params.invoiceUuid, e.body),
|
|
630
630
|
queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
|
|
631
631
|
});
|
|
632
632
|
}
|
|
@@ -687,7 +687,7 @@ var Un = w.object({
|
|
|
687
687
|
props: { billingDocument: {} },
|
|
688
688
|
setup(e) {
|
|
689
689
|
let t = e, n = T(), r = _n(), i = Hn(), a = vn({
|
|
690
|
-
initialState: D(() =>
|
|
690
|
+
initialState: D(() => y.toForm(t.billingDocument.attachments)),
|
|
691
691
|
schema: Wn,
|
|
692
692
|
onSubmit: async (e) => {
|
|
693
693
|
let n = await i.execute({
|
|
@@ -826,20 +826,20 @@ function rr(e) {
|
|
|
826
826
|
//#endregion
|
|
827
827
|
//#region src/ui/billing-document/table/billingDocumentLineItemsTable.context.ts
|
|
828
828
|
var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
829
|
+
i._0,
|
|
830
|
+
i._6,
|
|
831
|
+
i._12,
|
|
832
|
+
i._21
|
|
833
833
|
], sr = [
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
834
|
+
a.PIECE,
|
|
835
|
+
a.HOUR,
|
|
836
|
+
a.DAY,
|
|
837
|
+
a.KILOMETER,
|
|
838
|
+
a.KILOGRAM,
|
|
839
|
+
a.METER,
|
|
840
|
+
a.CUBIC_METER,
|
|
841
|
+
a.SQUARE_METER,
|
|
842
|
+
a.LITRE
|
|
843
843
|
], H = class {
|
|
844
844
|
static buildBillingDocumentLineItemsPayload(e, t) {
|
|
845
845
|
let n = [], r = /* @__PURE__ */ new Map(), i = [], a = 1;
|
|
@@ -929,7 +929,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
929
929
|
quantity: this.getSignedQuantity(e, t.quantity),
|
|
930
930
|
type: "line",
|
|
931
931
|
unit: t.unit,
|
|
932
|
-
unitPrice:
|
|
932
|
+
unitPrice: v(t.unitPrice.amount, t.unitPrice.precision),
|
|
933
933
|
vatRate: t.vatRate
|
|
934
934
|
};
|
|
935
935
|
}
|
|
@@ -986,7 +986,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
986
986
|
quantity: t.quantity,
|
|
987
987
|
unit: t.unit,
|
|
988
988
|
unitPrice: {
|
|
989
|
-
amount:
|
|
989
|
+
amount: g(t.unitPrice, e.precision),
|
|
990
990
|
currency: e.currency,
|
|
991
991
|
precision: e.precision
|
|
992
992
|
},
|
|
@@ -1013,11 +1013,11 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1013
1013
|
customFields: [],
|
|
1014
1014
|
description: null,
|
|
1015
1015
|
discountPercentage: null,
|
|
1016
|
-
quantity: e.documentType ===
|
|
1016
|
+
quantity: e.documentType === s.CREDIT_NOTE ? -1 : 1,
|
|
1017
1017
|
type: "line",
|
|
1018
|
-
unit:
|
|
1019
|
-
unitPrice:
|
|
1020
|
-
vatRate:
|
|
1018
|
+
unit: a.PIECE,
|
|
1019
|
+
unitPrice: v(0, e.precision),
|
|
1020
|
+
vatRate: i._21
|
|
1021
1021
|
};
|
|
1022
1022
|
}
|
|
1023
1023
|
static deleteSelectedRows(e, t) {
|
|
@@ -1073,7 +1073,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1073
1073
|
return r === -1 ? t : r;
|
|
1074
1074
|
}
|
|
1075
1075
|
static getSignedQuantity(e, t) {
|
|
1076
|
-
return e !==
|
|
1076
|
+
return e !== s.CREDIT_NOTE || t <= 0 ? t : -t;
|
|
1077
1077
|
}
|
|
1078
1078
|
static groupSelectedRows(e, t, n) {
|
|
1079
1079
|
let r = e.filter((e) => this.isLineRow(e) && t.has(e.id)).map((e) => ({
|
|
@@ -1144,6 +1144,17 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1144
1144
|
}
|
|
1145
1145
|
return r;
|
|
1146
1146
|
}
|
|
1147
|
+
static resolveInsertGroupId(e, t, n = null) {
|
|
1148
|
+
let r = e[t - 1], i = e[t];
|
|
1149
|
+
if (r !== void 0 && this.isGroupRow(r)) return r.id;
|
|
1150
|
+
let a = r !== void 0 && this.isLineRow(r) ? r.groupId : null;
|
|
1151
|
+
if (a !== null) {
|
|
1152
|
+
if (i !== void 0 && this.isLineRow(i) && i.groupId === a) return a;
|
|
1153
|
+
if (n !== null) return n === "group" ? a : null;
|
|
1154
|
+
if (i === void 0 || this.isGroupRow(i)) return a;
|
|
1155
|
+
}
|
|
1156
|
+
return i !== void 0 && this.isLineRow(i) && i.groupId !== null ? i.groupId : null;
|
|
1157
|
+
}
|
|
1147
1158
|
static serializeLineFields(e) {
|
|
1148
1159
|
return this.isLineRow(e) ? {
|
|
1149
1160
|
groupId: e.groupId,
|
|
@@ -1224,14 +1235,14 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1224
1235
|
f[7] ||= j("span", { class: "mx-xxs h-5 w-px bg-secondary" }, null, -1),
|
|
1225
1236
|
M(R(Dt), {
|
|
1226
1237
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_group"),
|
|
1227
|
-
"icon-left": R(
|
|
1238
|
+
"icon-left": R(Oe),
|
|
1228
1239
|
size: "sm",
|
|
1229
1240
|
variant: "tertiary",
|
|
1230
1241
|
onClick: f[0] ||= (e) => R(n).mutations.groupSelectedLines()
|
|
1231
1242
|
}, null, 8, ["label", "icon-left"]),
|
|
1232
1243
|
M(R(Dt), {
|
|
1233
1244
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_duplicate"),
|
|
1234
|
-
"icon-left": R(
|
|
1245
|
+
"icon-left": R(he),
|
|
1235
1246
|
size: "sm",
|
|
1236
1247
|
variant: "tertiary",
|
|
1237
1248
|
onClick: f[1] ||= (e) => R(n).mutations.duplicateSelectedLines()
|
|
@@ -1246,7 +1257,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1246
1257
|
trigger: z(() => [M(R(Dt), {
|
|
1247
1258
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_set_vat"),
|
|
1248
1259
|
"icon-left": R(Te),
|
|
1249
|
-
"icon-right": R(
|
|
1260
|
+
"icon-right": R(ue),
|
|
1250
1261
|
size: "sm",
|
|
1251
1262
|
variant: "tertiary"
|
|
1252
1263
|
}, null, 8, [
|
|
@@ -1271,8 +1282,8 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1271
1282
|
}, {
|
|
1272
1283
|
trigger: z(() => [M(R(Dt), {
|
|
1273
1284
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_set_unit"),
|
|
1274
|
-
"icon-left": R(
|
|
1275
|
-
"icon-right": R(
|
|
1285
|
+
"icon-left": R(_e),
|
|
1286
|
+
"icon-right": R(ue),
|
|
1276
1287
|
size: "sm",
|
|
1277
1288
|
variant: "tertiary"
|
|
1278
1289
|
}, null, 8, [
|
|
@@ -1298,8 +1309,8 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1298
1309
|
}, {
|
|
1299
1310
|
trigger: z(() => [M(R(Dt), {
|
|
1300
1311
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_move_to_group"),
|
|
1301
|
-
"icon-left": R(
|
|
1302
|
-
"icon-right": R(
|
|
1312
|
+
"icon-left": R(se),
|
|
1313
|
+
"icon-right": R(ue),
|
|
1303
1314
|
size: "sm",
|
|
1304
1315
|
variant: "tertiary"
|
|
1305
1316
|
}, null, 8, [
|
|
@@ -1317,14 +1328,14 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1317
1328
|
}, 8, ["is-open"])) : k("", !0),
|
|
1318
1329
|
f[8] ||= j("span", { class: "mx-xxs h-5 w-px bg-secondary" }, null, -1),
|
|
1319
1330
|
M(R(Yt), {
|
|
1320
|
-
icon: R(
|
|
1331
|
+
icon: R(pe),
|
|
1321
1332
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.delete_all"),
|
|
1322
1333
|
size: "sm",
|
|
1323
1334
|
variant: "destructive-tertiary",
|
|
1324
1335
|
onClick: f[5] ||= (e) => R(n).mutations.deleteSelectedLines()
|
|
1325
1336
|
}, null, 8, ["icon", "label"]),
|
|
1326
1337
|
M(R(Yt), {
|
|
1327
|
-
icon: R(
|
|
1338
|
+
icon: R(le),
|
|
1328
1339
|
label: R(t).t("wise_invoicing.invoice.detail.line_items.bulk_clear"),
|
|
1329
1340
|
size: "sm",
|
|
1330
1341
|
variant: "tertiary",
|
|
@@ -1334,16 +1345,16 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1334
1345
|
}
|
|
1335
1346
|
}), vr = class {
|
|
1336
1347
|
static getDisplayGrossLineTotal(e, t, n) {
|
|
1337
|
-
return e ===
|
|
1348
|
+
return e === s.CREDIT_NOTE && n ? Math.abs(t) : this.getDisplayNumber(e, t);
|
|
1338
1349
|
}
|
|
1339
1350
|
static getDisplayMonetary(e, t) {
|
|
1340
|
-
return e !==
|
|
1351
|
+
return e !== s.CREDIT_NOTE || t.amount <= 0 ? t : {
|
|
1341
1352
|
...t,
|
|
1342
1353
|
amount: -t.amount
|
|
1343
1354
|
};
|
|
1344
1355
|
}
|
|
1345
1356
|
static getDisplayNumber(e, t) {
|
|
1346
|
-
return e !==
|
|
1357
|
+
return e !== s.CREDIT_NOTE || t <= 0 ? t : -t;
|
|
1347
1358
|
}
|
|
1348
1359
|
}, yr = ["aria-label"], br = { class: "w-72 py-xxs" }, xr = { class: "text-sm font-semibold text-primary" }, Sr = { class: "text-xs text-tertiary" }, Cr = { class: "text-sm font-semibold text-primary" }, wr = { class: "text-xs text-tertiary" }, Tr = /* @__PURE__ */ N({
|
|
1349
1360
|
__name: "BillingDocumentLineItemsInsertIndicator",
|
|
@@ -1386,12 +1397,12 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1386
1397
|
ref_key: "popoverAnchorRef",
|
|
1387
1398
|
ref: o,
|
|
1388
1399
|
class: Qe([a.value ? "opacity-100" : void 0, "flex size-5 items-center justify-center rounded-sm bg-brand-500 text-white opacity-0 shadow-sm transition-all group-hover:opacity-100 group-hover/trigger:bg-brand-700 group-focus-visible/trigger:opacity-100 group-has-focus-visible:opacity-100"])
|
|
1389
|
-
}, [M(R(
|
|
1400
|
+
}, [M(R(C), { class: "size-3" })], 2)], 8, yr)]),
|
|
1390
1401
|
content: z(() => [j("div", br, [j("button", {
|
|
1391
1402
|
class: "flex w-full items-center gap-md px-md py-sm text-left transition-colors hover:bg-secondary",
|
|
1392
1403
|
type: "button",
|
|
1393
1404
|
onClick: c
|
|
1394
|
-
}, [M(R(
|
|
1405
|
+
}, [M(R(C), { class: "size-5 shrink-0 text-tertiary" }), M(R(At), { gap: "none" }, {
|
|
1395
1406
|
default: z(() => [j("span", xr, L(R(i).t("wise_invoicing.invoice.detail.line_items.new_line_item")), 1), j("span", Sr, L(R(i).t("wise_invoicing.invoice.detail.line_items.new_line_item_description")), 1)]),
|
|
1396
1407
|
_: 1
|
|
1397
1408
|
})]), n.canAddGroup ? (F(), A("button", {
|
|
@@ -1399,7 +1410,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1399
1410
|
class: "flex w-full items-center gap-md border-t border-secondary px-md py-sm text-left transition-colors hover:bg-secondary",
|
|
1400
1411
|
type: "button",
|
|
1401
1412
|
onClick: l
|
|
1402
|
-
}, [M(R(
|
|
1413
|
+
}, [M(R(Oe), { class: "size-5 shrink-0 text-tertiary" }), M(R(At), { gap: "none" }, {
|
|
1403
1414
|
default: z(() => [j("span", Cr, L(R(i).t("wise_invoicing.invoice.detail.line_items.new_group")), 1), j("span", wr, L(R(i).t("wise_invoicing.invoice.detail.line_items.new_group_description")), 1)]),
|
|
1404
1415
|
_: 1
|
|
1405
1416
|
})])) : k("", !0)])]),
|
|
@@ -1407,10 +1418,18 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1407
1418
|
}, 8, ["is-open", "popover-anchor-reference-element"])], 2)
|
|
1408
1419
|
], 2));
|
|
1409
1420
|
}
|
|
1410
|
-
})
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1421
|
+
});
|
|
1422
|
+
//#endregion
|
|
1423
|
+
//#region src/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.ts
|
|
1424
|
+
function Er(e) {
|
|
1425
|
+
return w.object({
|
|
1426
|
+
name: w.string().trim().min(1, e.nameRequired),
|
|
1427
|
+
description: w.string().nullable()
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
//#endregion
|
|
1431
|
+
//#region src/ui/billing-document/table/BillingDocumentLineItemDeleteDialog.vue
|
|
1432
|
+
var Dr = /* @__PURE__ */ N({
|
|
1414
1433
|
__name: "BillingDocumentLineItemDeleteDialog",
|
|
1415
1434
|
props: {
|
|
1416
1435
|
name: {},
|
|
@@ -1443,7 +1462,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1443
1462
|
default: z(() => [
|
|
1444
1463
|
M(R(Bt), {
|
|
1445
1464
|
description: o.value,
|
|
1446
|
-
icon: R(
|
|
1465
|
+
icon: R(oe),
|
|
1447
1466
|
"is-description-visible": !0,
|
|
1448
1467
|
title: n.type === "line" ? R(i).t("wise_invoicing.invoice.detail.line_items.delete_dialog.line.title") : R(i).t("wise_invoicing.invoice.detail.line_items.delete_dialog.group.title")
|
|
1449
1468
|
}, null, 8, [
|
|
@@ -1503,20 +1522,28 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1503
1522
|
"data-line-item-drag-handle": ""
|
|
1504
1523
|
}, [...n[0] ||= [Ue("<path d=\"M9 6C9.55228 6 10 5.55228 10 5C10 4.44772 9.55228 4 9 4C8.44772 4 8 4.44772 8 5C8 5.55228 8.44772 6 9 6Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path><path d=\"M9 13C9.55228 13 10 12.5523 10 12C10 11.4477 9.55228 11 9 11C8.44772 11 8 11.4477 8 12C8 12.5523 8.44772 13 9 13Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path><path d=\"M9 20C9.55228 20 10 19.5523 10 19C10 18.4477 9.55228 18 9 18C8.44772 18 8 18.4477 8 19C8 19.5523 8.44772 20 9 20Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path><path d=\"M15 6C15.5523 6 16 5.55228 16 5C16 4.44772 15.5523 4 15 4C14.4477 4 14 4.44772 14 5C14 5.55228 14.4477 6 15 6Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path><path d=\"M15 13C15.5523 13 16 12.5523 16 12C16 11.4477 15.5523 11 15 11C14.4477 11 14 11.4477 14 12C14 12.5523 14.4477 13 15 13Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path><path d=\"M15 20C15.5523 20 16 19.5523 16 19C16 18.4477 15.5523 18 15 18C14.4477 18 14 18.4477 14 19C14 19.5523 14.4477 20 15 20Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"></path>", 6)]], 8, Or));
|
|
1505
1524
|
}
|
|
1506
|
-
}), Ar = ["for"], jr = {
|
|
1525
|
+
}), Ar = ["for"], jr = { key: 0 }, Mr = {
|
|
1507
1526
|
key: 0,
|
|
1508
1527
|
"aria-hidden": "true",
|
|
1509
1528
|
class: "pointer-events-none shrink-0 pl-lg text-sm text-tertiary select-none"
|
|
1510
|
-
},
|
|
1529
|
+
}, Nr = {
|
|
1511
1530
|
key: 1,
|
|
1512
1531
|
"aria-hidden": "true",
|
|
1532
|
+
class: "pointer-events-none shrink-0 pr-lg text-sm text-error-primary select-none"
|
|
1533
|
+
}, Pr = ["id", "title"], Fr = {
|
|
1534
|
+
key: 3,
|
|
1535
|
+
"aria-hidden": "true",
|
|
1513
1536
|
class: "pointer-events-none shrink-0 pr-lg text-sm text-tertiary select-none"
|
|
1514
|
-
},
|
|
1537
|
+
}, Ir = /*#__PURE__*/ Pe(/* @__PURE__ */ N({
|
|
1515
1538
|
inheritAttrs: !1,
|
|
1516
1539
|
__name: "BillingDocumentLineItemsTableField",
|
|
1517
1540
|
props: {
|
|
1518
1541
|
id: {},
|
|
1519
1542
|
isDisabled: { type: Boolean },
|
|
1543
|
+
isRequired: {
|
|
1544
|
+
type: Boolean,
|
|
1545
|
+
default: !1
|
|
1546
|
+
},
|
|
1520
1547
|
isTouched: { type: Boolean },
|
|
1521
1548
|
align: { default: "left" },
|
|
1522
1549
|
as: { default: "input" },
|
|
@@ -1529,27 +1556,29 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1529
1556
|
},
|
|
1530
1557
|
emits: ["blur"],
|
|
1531
1558
|
setup(e, { emit: t }) {
|
|
1532
|
-
let n = e, r = t, i = ut(), a = D(() => n.isTouched && n.errorMessage !== null), o = D(() => i.type === "number"), s = D(() => n.align === "right");
|
|
1559
|
+
let n = e, r = t, i = ut(), a = D(() => n.isTouched && n.errorMessage !== null), o = D(() => i.type === "number"), s = D(() => n.align === "right"), c = D(() => `${n.id}-error`);
|
|
1533
1560
|
return (e, t) => (F(), A(E, null, [j("label", {
|
|
1534
1561
|
for: n.id,
|
|
1535
1562
|
class: "sr-only"
|
|
1536
|
-
}, L(n.label),
|
|
1563
|
+
}, [We(L(n.label), 1), n.isRequired ? (F(), A("span", jr, "*")) : k("", !0)], 8, Ar), j("div", { class: Qe([[
|
|
1537
1564
|
n.width === "content" ? "w-auto max-w-full" : "w-full",
|
|
1538
1565
|
n.variant === "outlined" && !a.value ? "bg-primary" : "\n bg-transparent\n ",
|
|
1539
1566
|
n.isDisabled ? "cursor-not-allowed" : "cursor-text",
|
|
1540
1567
|
a.value && !n.isDisabled ? "bg-primary ring-2 ring-error-500 ring-inset" : n.isDisabled ? "" : "\n focus-within:z-10 focus-within:bg-primary focus-within:ring-2\n focus-within:ring-brand-500 focus-within:ring-inset\n "
|
|
1541
1568
|
], "relative flex h-11 items-center rounded-md border border-transparent transition-[background-color,box-shadow] duration-100 motion-reduce:transition-none"]) }, [
|
|
1542
|
-
n.prefix ? (F(), A("span",
|
|
1569
|
+
n.prefix ? (F(), A("span", Mr, L(n.prefix), 1)) : k("", !0),
|
|
1543
1570
|
(F(), O(ct(n.as), P(R(i), {
|
|
1544
1571
|
id: n.id,
|
|
1545
1572
|
disabled: n.isDisabled,
|
|
1573
|
+
required: n.isRequired,
|
|
1546
1574
|
"data-is-number-input": o.value || void 0,
|
|
1547
1575
|
"aria-invalid": a.value,
|
|
1576
|
+
"aria-describedby": a.value ? c.value : void 0,
|
|
1548
1577
|
class: [[
|
|
1549
1578
|
s.value ? "text-right" : "text-left",
|
|
1550
1579
|
n.width === "content" ? "w-auto flex-none" : "min-w-0 flex-1",
|
|
1551
1580
|
n.prefix ? "pl-xs" : n.variant === "outlined" ? "pl-md" : "\n pl-lg\n ",
|
|
1552
|
-
n.suffix ? "pr-xs" : n.variant === "outlined" ? "pr-md" : "
|
|
1581
|
+
n.suffix || n.isRequired || a.value ? "pr-xs" : n.variant === "outlined" ? "pr-md" : "pr-lg"
|
|
1553
1582
|
], "relative z-1 h-full border-none bg-transparent text-sm text-primary tabular-nums outline-none placeholder:text-placeholder disabled:cursor-not-allowed disabled:text-disabled"],
|
|
1554
1583
|
onBlur: t[0] ||= (e) => r("blur", e)
|
|
1555
1584
|
}), {
|
|
@@ -1558,18 +1587,28 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1558
1587
|
}, 16, [
|
|
1559
1588
|
"id",
|
|
1560
1589
|
"disabled",
|
|
1590
|
+
"required",
|
|
1561
1591
|
"data-is-number-input",
|
|
1562
1592
|
"aria-invalid",
|
|
1593
|
+
"aria-describedby",
|
|
1563
1594
|
"class"
|
|
1564
1595
|
])),
|
|
1565
|
-
n.
|
|
1596
|
+
n.isRequired && !a.value ? (F(), A("span", Nr, " * ")) : k("", !0),
|
|
1597
|
+
a.value ? (F(), A("span", {
|
|
1598
|
+
key: 2,
|
|
1599
|
+
id: c.value,
|
|
1600
|
+
title: n.errorMessage ?? void 0,
|
|
1601
|
+
class: "pointer-events-none min-w-0 shrink truncate pr-lg text-xs text-error-primary"
|
|
1602
|
+
}, L(n.errorMessage), 9, Pr)) : k("", !0),
|
|
1603
|
+
n.suffix ? (F(), A("span", Fr, L(n.suffix), 1)) : k("", !0)
|
|
1566
1604
|
], 2)], 64));
|
|
1567
1605
|
}
|
|
1568
|
-
}), [["__scopeId", "data-v-
|
|
1606
|
+
}), [["__scopeId", "data-v-38f52859"]]), Lr = /* @__PURE__ */ N({
|
|
1569
1607
|
__name: "BillingDocumentLineItemsTableTextField",
|
|
1570
1608
|
props: /*@__PURE__*/ Xe({
|
|
1571
1609
|
id: {},
|
|
1572
1610
|
isDisabled: { type: Boolean },
|
|
1611
|
+
isRequired: { type: Boolean },
|
|
1573
1612
|
isTouched: { type: Boolean },
|
|
1574
1613
|
errorMessage: {},
|
|
1575
1614
|
label: {},
|
|
@@ -1583,23 +1622,23 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1583
1622
|
emits: /*@__PURE__*/ Xe(["blur"], ["update:modelValue"]),
|
|
1584
1623
|
setup(e, { emit: t }) {
|
|
1585
1624
|
let n = e, r = t, i = dt(e, "modelValue");
|
|
1586
|
-
return (e, t) => (F(), O(
|
|
1625
|
+
return (e, t) => (F(), O(Ir, P(n, {
|
|
1587
1626
|
value: i.value ?? "",
|
|
1588
1627
|
type: "text",
|
|
1589
1628
|
onBlur: t[0] ||= (e) => r("blur", e),
|
|
1590
1629
|
onInput: t[1] ||= (e) => i.value = e.target.value
|
|
1591
1630
|
}), null, 16, ["value"]));
|
|
1592
1631
|
}
|
|
1593
|
-
}),
|
|
1632
|
+
}), Rr = ["data-line-item-row-id"], zr = {
|
|
1594
1633
|
key: 0,
|
|
1595
1634
|
class: "relative overflow-visible px-xs py-none"
|
|
1596
|
-
},
|
|
1635
|
+
}, Br = {
|
|
1597
1636
|
key: 1,
|
|
1598
1637
|
class: "px-xs py-none text-center"
|
|
1599
|
-
},
|
|
1638
|
+
}, Vr = ["colspan"], Hr = ["aria-label", "aria-expanded"], Ur = { class: "px-lg py-none text-right text-sm font-semibold text-secondary tabular-nums" }, Wr = {
|
|
1600
1639
|
key: 2,
|
|
1601
1640
|
class: "px-md py-none"
|
|
1602
|
-
},
|
|
1641
|
+
}, Gr = /* @__PURE__ */ N({
|
|
1603
1642
|
__name: "BillingDocumentLineItemsTableGroupRow",
|
|
1604
1643
|
props: {
|
|
1605
1644
|
isCollapsed: { type: Boolean },
|
|
@@ -1609,7 +1648,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1609
1648
|
},
|
|
1610
1649
|
emits: ["toggleCollapse"],
|
|
1611
1650
|
setup(e, { emit: t }) {
|
|
1612
|
-
let n = e, r = t, i = T(), a =
|
|
1651
|
+
let n = e, r = t, i = T(), a = _(), o = ar(), s = gn().create(Dr), c = ft("editFieldsRef"), l = I(n.group.name === ""), u = I("name"), d = D(() => n.group.name || i.t("wise_invoicing.invoice.detail.line_items.group_placeholder"));
|
|
1613
1652
|
function f(e, t) {
|
|
1614
1653
|
return Math.min(Math.max((e == null || e === "" ? t : e).length, 10), 64);
|
|
1615
1654
|
}
|
|
@@ -1621,28 +1660,28 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1621
1660
|
name: n.group.name,
|
|
1622
1661
|
description: n.group.description
|
|
1623
1662
|
})),
|
|
1624
|
-
schema: Er,
|
|
1663
|
+
schema: Er({ nameRequired: i.t("wise_invoicing.invoice.detail.line_items.group_name_required") }),
|
|
1625
1664
|
onSubmit: (e) => {
|
|
1626
1665
|
p(e) && o.mutations.updateGroup(n.group.id, e);
|
|
1627
1666
|
}
|
|
1628
|
-
}), h = m.register("name"), g = m.register("description"),
|
|
1667
|
+
}), h = m.register("name"), g = m.register("description"), v = D(() => f(m.state.value.name, d.value)), y = D(() => f(m.state.value.description, i.t("wise_invoicing.invoice.detail.line_items.group_description_placeholder"))), b = D(() => o.rows.value.filter((e) => H.isLineRow(e) && e.groupId === n.group.id).map((e) => e.id)), x = D(() => b.value.length > 0 && b.value.every((e) => o.selection.isSelected(e))), ee = D(() => !x.value && b.value.some((e) => o.selection.isSelected(e)));
|
|
1629
1668
|
function te() {
|
|
1630
1669
|
let e = !x.value;
|
|
1631
1670
|
for (let t of b.value) e !== o.selection.isSelected(t) && o.selection.toggleRow(t);
|
|
1632
1671
|
}
|
|
1633
|
-
let
|
|
1634
|
-
function
|
|
1672
|
+
let S = D(() => n.total === null ? null : a.format(o.meta.value.currency, n.total));
|
|
1673
|
+
function C(e) {
|
|
1635
1674
|
return `billing-document-line-items-group-${e}-${n.group.id}`;
|
|
1636
1675
|
}
|
|
1637
|
-
async function
|
|
1676
|
+
async function ne(e) {
|
|
1638
1677
|
await Ze();
|
|
1639
|
-
let t = c.value?.querySelector(`input[id="${
|
|
1678
|
+
let t = c.value?.querySelector(`input[id="${C(e)}"]`);
|
|
1640
1679
|
t?.focus(), t?.select();
|
|
1641
1680
|
}
|
|
1642
|
-
async function
|
|
1643
|
-
o.isEditable.value && (u.value = e, l.value = !0, await
|
|
1681
|
+
async function re(e = "name") {
|
|
1682
|
+
o.isEditable.value && (u.value = e, l.value = !0, await ne(e));
|
|
1644
1683
|
}
|
|
1645
|
-
async function
|
|
1684
|
+
async function ie() {
|
|
1646
1685
|
await s.open({
|
|
1647
1686
|
name: n.group.name || i.t("wise_invoicing.invoice.detail.line_items.group_placeholder"),
|
|
1648
1687
|
lineCount: b.value.length,
|
|
@@ -1653,9 +1692,9 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1653
1692
|
});
|
|
1654
1693
|
}
|
|
1655
1694
|
nt(async () => {
|
|
1656
|
-
l.value && await
|
|
1695
|
+
l.value && await ne(u.value);
|
|
1657
1696
|
});
|
|
1658
|
-
async function
|
|
1697
|
+
async function ae(e) {
|
|
1659
1698
|
if (!c.value?.contains(e.relatedTarget)) {
|
|
1660
1699
|
if (await Ze(), !m.isValid.value) {
|
|
1661
1700
|
l.value = !0;
|
|
@@ -1664,7 +1703,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1664
1703
|
await m.submit(), l.value = !1;
|
|
1665
1704
|
}
|
|
1666
1705
|
}
|
|
1667
|
-
async function
|
|
1706
|
+
async function oe() {
|
|
1668
1707
|
if (await Ze(), !m.isValid.value) {
|
|
1669
1708
|
h.onBlur();
|
|
1670
1709
|
return;
|
|
@@ -1682,9 +1721,9 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1682
1721
|
"data-line-item-row-type": "group",
|
|
1683
1722
|
"data-line-item-row": ""
|
|
1684
1723
|
}, [
|
|
1685
|
-
R(o).isEditable.value ? (F(), A("td",
|
|
1686
|
-
R(o).isEditable.value ? (F(), A("td",
|
|
1687
|
-
id:
|
|
1724
|
+
R(o).isEditable.value ? (F(), A("td", zr, [M(kr)])) : k("", !0),
|
|
1725
|
+
R(o).isEditable.value ? (F(), A("td", Br, [M(R(Ot), {
|
|
1726
|
+
id: C("select-group"),
|
|
1688
1727
|
"model-value": x.value || ee.value,
|
|
1689
1728
|
"is-indeterminate": ee.value,
|
|
1690
1729
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.select_group"),
|
|
@@ -1712,7 +1751,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1712
1751
|
class: "flex shrink-0 items-center justify-center rounded-sm text-tertiary transition-colors hover:text-primary",
|
|
1713
1752
|
type: "button",
|
|
1714
1753
|
onClick: t[0] ||= (e) => r("toggleCollapse")
|
|
1715
|
-
}, [M(R(
|
|
1754
|
+
}, [M(R(ue), { class: Qe([n.isCollapsed ? "-rotate-90" : "rotate-0", "size-4 transition-transform duration-200 motion-reduce:transition-none"]) }, null, 8, ["class"])], 8, Hr),
|
|
1716
1755
|
j("div", {
|
|
1717
1756
|
ref_key: "editFieldsRef",
|
|
1718
1757
|
ref: c,
|
|
@@ -1722,33 +1761,34 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1722
1761
|
align: "center",
|
|
1723
1762
|
class: "min-w-0",
|
|
1724
1763
|
gap: "xs",
|
|
1725
|
-
onFocusout:
|
|
1764
|
+
onFocusout: ae
|
|
1726
1765
|
}, {
|
|
1727
|
-
default: z(() => [M(
|
|
1728
|
-
id:
|
|
1766
|
+
default: z(() => [M(Lr, P({
|
|
1767
|
+
id: C("name"),
|
|
1729
1768
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.group_label"),
|
|
1730
1769
|
placeholder: R(i).t("wise_invoicing.invoice.detail.line_items.group_placeholder"),
|
|
1731
|
-
size:
|
|
1770
|
+
size: v.value,
|
|
1732
1771
|
"is-disabled": !R(o).isEditable.value,
|
|
1772
|
+
"is-required": !0,
|
|
1733
1773
|
class: "font-semibold",
|
|
1734
1774
|
variant: "ghost",
|
|
1735
1775
|
width: "content"
|
|
1736
|
-
}, R(Ne)(R(h)), { onKeydown: gt(_t(
|
|
1776
|
+
}, R(Ne)(R(h)), { onKeydown: gt(_t(oe, ["prevent"]), ["enter"]) }), null, 16, [
|
|
1737
1777
|
"id",
|
|
1738
1778
|
"label",
|
|
1739
1779
|
"placeholder",
|
|
1740
1780
|
"size",
|
|
1741
1781
|
"is-disabled",
|
|
1742
1782
|
"onKeydown"
|
|
1743
|
-
]), M(
|
|
1744
|
-
id:
|
|
1783
|
+
]), M(Lr, P({
|
|
1784
|
+
id: C("description"),
|
|
1745
1785
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.group_description_label"),
|
|
1746
1786
|
placeholder: R(i).t("wise_invoicing.invoice.detail.line_items.group_description_placeholder"),
|
|
1747
1787
|
size: y.value,
|
|
1748
1788
|
"is-disabled": !R(o).isEditable.value,
|
|
1749
1789
|
variant: "ghost",
|
|
1750
1790
|
width: "content"
|
|
1751
|
-
}, R(Ne)(R(g)), { onKeydown: gt(_t(
|
|
1791
|
+
}, R(Ne)(R(g)), { onKeydown: gt(_t(oe, ["prevent"]), ["enter"]) }), null, 16, [
|
|
1752
1792
|
"id",
|
|
1753
1793
|
"label",
|
|
1754
1794
|
"placeholder",
|
|
@@ -1771,7 +1811,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1771
1811
|
default: z(() => [j("button", {
|
|
1772
1812
|
class: "min-w-0 truncate text-left text-sm font-semibold text-primary transition-colors hover:text-brand-700 motion-reduce:transition-none",
|
|
1773
1813
|
type: "button",
|
|
1774
|
-
onClick: t[1] ||= (e) =>
|
|
1814
|
+
onClick: t[1] ||= (e) => re()
|
|
1775
1815
|
}, L(d.value), 1)]),
|
|
1776
1816
|
_: 1
|
|
1777
1817
|
})) : (F(), O(R(V), {
|
|
@@ -1794,7 +1834,7 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1794
1834
|
default: z(() => [j("button", {
|
|
1795
1835
|
class: "min-w-0 truncate text-left text-sm text-tertiary transition-colors hover:text-secondary motion-reduce:transition-none",
|
|
1796
1836
|
type: "button",
|
|
1797
|
-
onClick: t[2] ||= (e) =>
|
|
1837
|
+
onClick: t[2] ||= (e) => re("description")
|
|
1798
1838
|
}, L(n.group.description), 1)]),
|
|
1799
1839
|
_: 1
|
|
1800
1840
|
})) : (F(), O(R(V), {
|
|
@@ -1813,9 +1853,9 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1813
1853
|
}, null, 8, ["definitions", "values"])
|
|
1814
1854
|
]),
|
|
1815
1855
|
_: 1
|
|
1816
|
-
})], 8,
|
|
1817
|
-
j("td",
|
|
1818
|
-
R(o).isEditable.value ? (F(), A("td",
|
|
1856
|
+
})], 8, Vr),
|
|
1857
|
+
j("td", Ur, L(S.value), 1),
|
|
1858
|
+
R(o).isEditable.value ? (F(), A("td", Wr, [M(R(B), {
|
|
1819
1859
|
justify: "end",
|
|
1820
1860
|
gap: "xxs",
|
|
1821
1861
|
class: "opacity-0 transition group-focus-within/row:opacity-100 group-hover/row:opacity-100"
|
|
@@ -1825,17 +1865,17 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1825
1865
|
"is-disabled": !R(o).isEditable.value,
|
|
1826
1866
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.edit_group"),
|
|
1827
1867
|
variant: "tertiary",
|
|
1828
|
-
onClick: t[3] ||= (e) =>
|
|
1868
|
+
onClick: t[3] ||= (e) => re()
|
|
1829
1869
|
}, null, 8, [
|
|
1830
1870
|
"icon",
|
|
1831
1871
|
"is-disabled",
|
|
1832
1872
|
"label"
|
|
1833
1873
|
]), M(R(Yt), {
|
|
1834
|
-
icon: R(
|
|
1874
|
+
icon: R(pe),
|
|
1835
1875
|
"is-disabled": !R(o).isEditable.value,
|
|
1836
1876
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.delete_group"),
|
|
1837
1877
|
variant: "destructive-tertiary",
|
|
1838
|
-
onClick:
|
|
1878
|
+
onClick: ie
|
|
1839
1879
|
}, null, 8, [
|
|
1840
1880
|
"icon",
|
|
1841
1881
|
"is-disabled",
|
|
@@ -1843,25 +1883,25 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1843
1883
|
])]),
|
|
1844
1884
|
_: 1
|
|
1845
1885
|
})])) : k("", !0)
|
|
1846
|
-
], 8,
|
|
1886
|
+
], 8, Rr));
|
|
1847
1887
|
}
|
|
1848
|
-
}),
|
|
1888
|
+
}), Kr = w.object({
|
|
1849
1889
|
name: w.string().trim().min(1),
|
|
1850
1890
|
description: w.string().nullable(),
|
|
1851
1891
|
discountPercentage: w.number().min(0).max(100).nullable(),
|
|
1852
1892
|
quantity: w.number().positive().max(1e5),
|
|
1853
|
-
unit: w.enum(
|
|
1893
|
+
unit: w.enum(a),
|
|
1854
1894
|
unitPrice: w.number().nonnegative().max(5e11),
|
|
1855
|
-
vatRate: w.enum(
|
|
1856
|
-
}),
|
|
1895
|
+
vatRate: w.enum(i)
|
|
1896
|
+
}), qr = w.object({
|
|
1857
1897
|
name: w.string().trim().min(1),
|
|
1858
1898
|
description: w.string().nullable(),
|
|
1859
1899
|
discountPercentage: w.number().min(0).max(100).nullable(),
|
|
1860
1900
|
quantity: w.number().negative().min(-1e5),
|
|
1861
|
-
unit: w.enum(
|
|
1901
|
+
unit: w.enum(a),
|
|
1862
1902
|
unitPrice: w.number().nonnegative().max(5e11),
|
|
1863
|
-
vatRate: w.enum(
|
|
1864
|
-
}),
|
|
1903
|
+
vatRate: w.enum(i)
|
|
1904
|
+
}), Jr = class {
|
|
1865
1905
|
static findByDefinition(e, t) {
|
|
1866
1906
|
return e.find((e) => e.definitionUuid === t) ?? null;
|
|
1867
1907
|
}
|
|
@@ -1871,53 +1911,53 @@ var [ir, ar] = rr("BillingDocumentLineItemsTable"), or = [
|
|
|
1871
1911
|
};
|
|
1872
1912
|
//#endregion
|
|
1873
1913
|
//#region src/modules/custom-field/composables/customFieldValueModel.composable.ts
|
|
1874
|
-
function
|
|
1914
|
+
function Yr(e) {
|
|
1875
1915
|
let { currency: t, definition: n, precision: r, value: i } = e, a = D({
|
|
1876
|
-
get: () => i.value?.type ===
|
|
1916
|
+
get: () => i.value?.type === m.TEXT ? i.value.value : null,
|
|
1877
1917
|
set: (e) => {
|
|
1878
1918
|
i.value = e === null || e.trim() === "" ? null : {
|
|
1879
1919
|
definitionUuid: n().uuid,
|
|
1880
|
-
type:
|
|
1920
|
+
type: m.TEXT,
|
|
1881
1921
|
value: e
|
|
1882
1922
|
};
|
|
1883
1923
|
}
|
|
1884
1924
|
}), o = D({
|
|
1885
|
-
get: () => i.value?.type ===
|
|
1925
|
+
get: () => i.value?.type === m.TEXT_ARRAY ? i.value.value : [],
|
|
1886
1926
|
set: (e) => {
|
|
1887
1927
|
i.value = e.length === 0 ? null : {
|
|
1888
1928
|
definitionUuid: n().uuid,
|
|
1889
|
-
type:
|
|
1929
|
+
type: m.TEXT_ARRAY,
|
|
1890
1930
|
value: e
|
|
1891
1931
|
};
|
|
1892
1932
|
}
|
|
1893
1933
|
}), s = D({
|
|
1894
|
-
get: () => i.value?.type ===
|
|
1934
|
+
get: () => i.value?.type === m.NUMBER ? i.value.value : null,
|
|
1895
1935
|
set: (e) => {
|
|
1896
1936
|
i.value = e === null ? null : {
|
|
1897
1937
|
definitionUuid: n().uuid,
|
|
1898
|
-
type:
|
|
1938
|
+
type: m.NUMBER,
|
|
1899
1939
|
value: e
|
|
1900
1940
|
};
|
|
1901
1941
|
}
|
|
1902
1942
|
}), c = D({
|
|
1903
|
-
get: () => i.value?.type ===
|
|
1943
|
+
get: () => i.value?.type === m.BOOLEAN && i.value.value,
|
|
1904
1944
|
set: (e) => {
|
|
1905
1945
|
i.value = {
|
|
1906
1946
|
definitionUuid: n().uuid,
|
|
1907
|
-
type:
|
|
1947
|
+
type: m.BOOLEAN,
|
|
1908
1948
|
value: e
|
|
1909
1949
|
};
|
|
1910
1950
|
}
|
|
1911
1951
|
}), l = D({
|
|
1912
|
-
get: () => i.value?.type ===
|
|
1952
|
+
get: () => i.value?.type === m.DATE && i.value.value instanceof wt.PlainDate ? i.value.value : null,
|
|
1913
1953
|
set: (e) => {
|
|
1914
1954
|
i.value = e === null ? null : {
|
|
1915
1955
|
definitionUuid: n().uuid,
|
|
1916
|
-
type:
|
|
1956
|
+
type: m.DATE,
|
|
1917
1957
|
value: e
|
|
1918
1958
|
};
|
|
1919
1959
|
}
|
|
1920
|
-
}), u = D(() => i.value?.type ===
|
|
1960
|
+
}), u = D(() => i.value?.type === m.TIMESTAMP ? i.value.value.toZonedDateTimeISO(wt.Now.timeZoneId()) : null);
|
|
1921
1961
|
function d(e, t) {
|
|
1922
1962
|
if (e === null) {
|
|
1923
1963
|
i.value = null;
|
|
@@ -1925,7 +1965,7 @@ function Kr(e) {
|
|
|
1925
1965
|
}
|
|
1926
1966
|
i.value = {
|
|
1927
1967
|
definitionUuid: n().uuid,
|
|
1928
|
-
type:
|
|
1968
|
+
type: m.TIMESTAMP,
|
|
1929
1969
|
value: e.toZonedDateTime({
|
|
1930
1970
|
plainTime: t ?? new wt.PlainTime(),
|
|
1931
1971
|
timeZone: wt.Now.timeZoneId()
|
|
@@ -1942,54 +1982,54 @@ function Kr(e) {
|
|
|
1942
1982
|
set: (e) => {
|
|
1943
1983
|
d(u.value?.toPlainDate() ?? null, e);
|
|
1944
1984
|
}
|
|
1945
|
-
}),
|
|
1946
|
-
get: () => i.value?.type ===
|
|
1985
|
+
}), h = D({
|
|
1986
|
+
get: () => i.value?.type === m.SINGLE_SELECT ? i.value.value : null,
|
|
1947
1987
|
set: (e) => {
|
|
1948
1988
|
i.value = e === null ? null : {
|
|
1949
1989
|
definitionUuid: n().uuid,
|
|
1950
|
-
type:
|
|
1990
|
+
type: m.SINGLE_SELECT,
|
|
1951
1991
|
value: e
|
|
1952
1992
|
};
|
|
1953
1993
|
}
|
|
1954
|
-
}),
|
|
1955
|
-
get: () => i.value?.type ===
|
|
1994
|
+
}), _ = D({
|
|
1995
|
+
get: () => i.value?.type === m.MULTI_SELECT ? i.value.value : [],
|
|
1956
1996
|
set: (e) => {
|
|
1957
1997
|
i.value = e.length === 0 ? null : {
|
|
1958
1998
|
definitionUuid: n().uuid,
|
|
1959
|
-
type:
|
|
1999
|
+
type: m.MULTI_SELECT,
|
|
1960
2000
|
value: e
|
|
1961
2001
|
};
|
|
1962
2002
|
}
|
|
1963
|
-
}),
|
|
2003
|
+
}), y = D(() => i.value?.type === m.MONETARY ? i.value.value.precision : r());
|
|
1964
2004
|
return {
|
|
1965
2005
|
timestampDate: f,
|
|
1966
2006
|
timestampTime: p,
|
|
1967
2007
|
boolean: c,
|
|
1968
2008
|
date: l,
|
|
1969
2009
|
monetary: D({
|
|
1970
|
-
get: () => i.value?.type ===
|
|
2010
|
+
get: () => i.value?.type === m.MONETARY ? v(i.value.value.amount, y.value) : null,
|
|
1971
2011
|
set: (e) => {
|
|
1972
2012
|
i.value = e === null ? null : {
|
|
1973
2013
|
definitionUuid: n().uuid,
|
|
1974
|
-
type:
|
|
2014
|
+
type: m.MONETARY,
|
|
1975
2015
|
value: {
|
|
1976
|
-
amount:
|
|
2016
|
+
amount: g(e, y.value),
|
|
1977
2017
|
currency: t(),
|
|
1978
|
-
precision:
|
|
2018
|
+
precision: y.value
|
|
1979
2019
|
}
|
|
1980
2020
|
};
|
|
1981
2021
|
}
|
|
1982
2022
|
}),
|
|
1983
|
-
multiSelect:
|
|
2023
|
+
multiSelect: _,
|
|
1984
2024
|
number: s,
|
|
1985
|
-
singleSelect:
|
|
2025
|
+
singleSelect: h,
|
|
1986
2026
|
text: a,
|
|
1987
2027
|
textArray: o
|
|
1988
2028
|
};
|
|
1989
2029
|
}
|
|
1990
2030
|
//#endregion
|
|
1991
2031
|
//#region src/modules/custom-field/components/CustomFieldValueInput.vue
|
|
1992
|
-
var
|
|
2032
|
+
var Xr = /* @__PURE__ */ N({
|
|
1993
2033
|
__name: "CustomFieldValueInput",
|
|
1994
2034
|
props: /*@__PURE__*/ Xe({
|
|
1995
2035
|
isDisabled: { type: Boolean },
|
|
@@ -2005,25 +2045,25 @@ var qr = /* @__PURE__ */ N({
|
|
|
2005
2045
|
}),
|
|
2006
2046
|
emits: ["update:modelValue"],
|
|
2007
2047
|
setup(e) {
|
|
2008
|
-
let t = e, n = dt(e, "modelValue"), r = T(), i =
|
|
2048
|
+
let t = e, n = dt(e, "modelValue"), r = T(), i = Yr({
|
|
2009
2049
|
currency: () => t.currency,
|
|
2010
2050
|
definition: () => t.definition,
|
|
2011
2051
|
precision: () => t.precision,
|
|
2012
2052
|
value: n
|
|
2013
2053
|
}), a = D(() => {
|
|
2014
2054
|
let e = Ae.getLabel(t.definition, r.locale.value);
|
|
2015
|
-
return t.definition.type ===
|
|
2055
|
+
return t.definition.type === m.MONETARY ? `${e} (${t.currency})` : e;
|
|
2016
2056
|
}), o = D(() => ({
|
|
2017
2057
|
isDisabled: t.isDisabled ?? !1,
|
|
2018
2058
|
isLabelHidden: t.isLabelHidden ?? !1,
|
|
2019
2059
|
isRequired: t.definition.isRequired,
|
|
2020
2060
|
helpText: t.definition.description === null ? null : Ae.getLocalizedValue(t.definition.description, r.locale.value),
|
|
2021
2061
|
label: a.value
|
|
2022
|
-
})), s = D(() => mn(t.definition.choices.toSorted((e, t) => e.order - t.order).map((e) => e.value))), c = D(() => n.value?.type ===
|
|
2062
|
+
})), s = D(() => mn(t.definition.choices.toSorted((e, t) => e.order - t.order).map((e) => e.value))), c = D(() => n.value?.type === m.DATE ? n.value.value === "infinity" ? r.t("wise_invoicing.custom_field.date.infinity") : n.value.value === "-infinity" ? r.t("wise_invoicing.custom_field.date.negative_infinity") : null : null);
|
|
2023
2063
|
function l(e) {
|
|
2024
2064
|
return Ae.getChoiceLabel(t.definition, e, r.locale.value);
|
|
2025
2065
|
}
|
|
2026
|
-
return (e, n) => t.definition.type === R(
|
|
2066
|
+
return (e, n) => t.definition.type === R(m).TEXT ? (F(), O(R(sn), P({
|
|
2027
2067
|
key: 0,
|
|
2028
2068
|
modelValue: R(i).text.value,
|
|
2029
2069
|
"onUpdate:modelValue": n[0] ||= (e) => R(i).text.value = e
|
|
@@ -2034,7 +2074,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2034
2074
|
"modelValue",
|
|
2035
2075
|
"placeholder",
|
|
2036
2076
|
"size"
|
|
2037
|
-
])) : t.definition.type === R(
|
|
2077
|
+
])) : t.definition.type === R(m).TEXT_ARRAY ? (F(), O(R(on), P({
|
|
2038
2078
|
key: 1,
|
|
2039
2079
|
modelValue: R(i).textArray.value,
|
|
2040
2080
|
"onUpdate:modelValue": n[1] ||= (e) => R(i).textArray.value = e
|
|
@@ -2045,15 +2085,15 @@ var qr = /* @__PURE__ */ N({
|
|
|
2045
2085
|
"modelValue",
|
|
2046
2086
|
"placeholder",
|
|
2047
2087
|
"size"
|
|
2048
|
-
])) : t.definition.type === R(
|
|
2088
|
+
])) : t.definition.type === R(m).NUMBER ? (F(), O(R(Xt), P({
|
|
2049
2089
|
key: 2,
|
|
2050
2090
|
modelValue: R(i).number.value,
|
|
2051
2091
|
"onUpdate:modelValue": n[2] ||= (e) => R(i).number.value = e
|
|
2052
|
-
}, o.value, { placeholder: t.placeholder }), null, 16, ["modelValue", "placeholder"])) : t.definition.type === R(
|
|
2092
|
+
}, o.value, { placeholder: t.placeholder }), null, 16, ["modelValue", "placeholder"])) : t.definition.type === R(m).BOOLEAN ? (F(), O(R(tn), P({
|
|
2053
2093
|
key: 3,
|
|
2054
2094
|
modelValue: R(i).boolean.value,
|
|
2055
2095
|
"onUpdate:modelValue": n[3] ||= (e) => R(i).boolean.value = e
|
|
2056
|
-
}, o.value), null, 16, ["modelValue"])) : t.definition.type === R(
|
|
2096
|
+
}, o.value), null, 16, ["modelValue"])) : t.definition.type === R(m).DATE ? (F(), O(R(Pt), P({
|
|
2057
2097
|
key: 4,
|
|
2058
2098
|
modelValue: R(i).date.value,
|
|
2059
2099
|
"onUpdate:modelValue": n[4] ||= (e) => R(i).date.value = e
|
|
@@ -2066,7 +2106,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2066
2106
|
"hint",
|
|
2067
2107
|
"placeholder",
|
|
2068
2108
|
"size"
|
|
2069
|
-
])) : t.definition.type === R(
|
|
2109
|
+
])) : t.definition.type === R(m).TIMESTAMP ? (F(), O(R(B), {
|
|
2070
2110
|
key: 5,
|
|
2071
2111
|
align: "start",
|
|
2072
2112
|
gap: "xs"
|
|
@@ -2097,7 +2137,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2097
2137
|
"size"
|
|
2098
2138
|
])]),
|
|
2099
2139
|
_: 1
|
|
2100
|
-
})) : t.definition.type === R(
|
|
2140
|
+
})) : t.definition.type === R(m).SINGLE_SELECT ? (F(), O(R(Qt), P({
|
|
2101
2141
|
key: 6,
|
|
2102
2142
|
modelValue: R(i).singleSelect.value,
|
|
2103
2143
|
"onUpdate:modelValue": n[7] ||= (e) => R(i).singleSelect.value = e
|
|
@@ -2111,7 +2151,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2111
2151
|
"items",
|
|
2112
2152
|
"placeholder",
|
|
2113
2153
|
"size"
|
|
2114
|
-
])) : t.definition.type === R(
|
|
2154
|
+
])) : t.definition.type === R(m).MULTI_SELECT ? (F(), O(R(Qt), P({
|
|
2115
2155
|
key: 7,
|
|
2116
2156
|
modelValue: R(i).multiSelect.value,
|
|
2117
2157
|
"onUpdate:modelValue": n[8] ||= (e) => R(i).multiSelect.value = e
|
|
@@ -2125,13 +2165,13 @@ var qr = /* @__PURE__ */ N({
|
|
|
2125
2165
|
"items",
|
|
2126
2166
|
"placeholder",
|
|
2127
2167
|
"size"
|
|
2128
|
-
])) : t.definition.type === R(
|
|
2168
|
+
])) : t.definition.type === R(m).MONETARY ? (F(), O(R(Xt), P({
|
|
2129
2169
|
key: 8,
|
|
2130
2170
|
modelValue: R(i).monetary.value,
|
|
2131
2171
|
"onUpdate:modelValue": n[9] ||= (e) => R(i).monetary.value = e
|
|
2132
2172
|
}, o.value, { placeholder: t.placeholder }), null, 16, ["modelValue", "placeholder"])) : k("", !0);
|
|
2133
2173
|
}
|
|
2134
|
-
}),
|
|
2174
|
+
}), Zr = /* @__PURE__ */ N({
|
|
2135
2175
|
__name: "BillingDocumentLineItemsTableNumberField",
|
|
2136
2176
|
props: /*@__PURE__*/ Xe({
|
|
2137
2177
|
id: {},
|
|
@@ -2173,7 +2213,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2173
2213
|
function u(e) {
|
|
2174
2214
|
o.value = !1, a.value = s(i.value), r("blur", e);
|
|
2175
2215
|
}
|
|
2176
|
-
return (e, t) => (F(), O(
|
|
2216
|
+
return (e, t) => (F(), O(Ir, P(n, {
|
|
2177
2217
|
value: a.value,
|
|
2178
2218
|
align: "right",
|
|
2179
2219
|
type: "number",
|
|
@@ -2182,13 +2222,13 @@ var qr = /* @__PURE__ */ N({
|
|
|
2182
2222
|
onInput: l
|
|
2183
2223
|
}), null, 16, ["value"]));
|
|
2184
2224
|
}
|
|
2185
|
-
}),
|
|
2225
|
+
}), Qr = [
|
|
2186
2226
|
"id",
|
|
2187
2227
|
"disabled",
|
|
2188
2228
|
"aria-invalid",
|
|
2189
2229
|
"aria-expanded",
|
|
2190
2230
|
"aria-controls"
|
|
2191
|
-
],
|
|
2231
|
+
], $r = /* @__PURE__ */ N({
|
|
2192
2232
|
__name: "BillingDocumentLineItemsTableSelectField",
|
|
2193
2233
|
props: /*@__PURE__*/ Xe({
|
|
2194
2234
|
id: {},
|
|
@@ -2230,10 +2270,10 @@ var qr = /* @__PURE__ */ N({
|
|
|
2230
2270
|
"aria-controls": `${n.id}-content`,
|
|
2231
2271
|
role: "combobox",
|
|
2232
2272
|
class: "relative z-1 flex size-full items-center justify-between border-none bg-transparent px-lg text-sm outline-none disabled:cursor-not-allowed"
|
|
2233
|
-
}, [j("span", { class: Qe([n.isDisabled ? "text-disabled" : s.value === null ? "text-placeholder" : "text-primary"]) }, L(s.value ?? n.placeholder ?? ""), 3), n.isDisabled ? k("", !0) : (F(), O(R(
|
|
2273
|
+
}, [j("span", { class: Qe([n.isDisabled ? "text-disabled" : s.value === null ? "text-placeholder" : "text-primary"]) }, L(s.value ?? n.placeholder ?? ""), 3), n.isDisabled ? k("", !0) : (F(), O(R(ue), {
|
|
2234
2274
|
key: 0,
|
|
2235
2275
|
class: "size-4 shrink-0 text-tertiary"
|
|
2236
|
-
}))], 8,
|
|
2276
|
+
}))], 8, Qr)]),
|
|
2237
2277
|
_: 1
|
|
2238
2278
|
}, 8, [
|
|
2239
2279
|
"id",
|
|
@@ -2244,7 +2284,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2244
2284
|
"items"
|
|
2245
2285
|
])], 2));
|
|
2246
2286
|
}
|
|
2247
|
-
}),
|
|
2287
|
+
}), ei = /* @__PURE__ */ N({
|
|
2248
2288
|
__name: "BillingDocumentLineItemsTableCustomField",
|
|
2249
2289
|
props: /*@__PURE__*/ Xe({
|
|
2250
2290
|
id: {},
|
|
@@ -2258,7 +2298,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2258
2298
|
}),
|
|
2259
2299
|
emits: ["update:modelValue"],
|
|
2260
2300
|
setup(e) {
|
|
2261
|
-
let t = e, n = dt(e, "modelValue"), r = T(), i =
|
|
2301
|
+
let t = e, n = dt(e, "modelValue"), r = T(), i = _(), a = Yr({
|
|
2262
2302
|
currency: () => t.currency,
|
|
2263
2303
|
definition: () => t.definition,
|
|
2264
2304
|
precision: () => t.precision,
|
|
@@ -2267,7 +2307,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2267
2307
|
label: Ae.getChoiceLabel(t.definition, e.value, r.locale.value),
|
|
2268
2308
|
value: e.value
|
|
2269
2309
|
})));
|
|
2270
|
-
return (e, r) => t.definition.type === R(
|
|
2310
|
+
return (e, r) => t.definition.type === R(m).TEXT ? (F(), O(Lr, {
|
|
2271
2311
|
key: 0,
|
|
2272
2312
|
id: t.id,
|
|
2273
2313
|
modelValue: R(a).text.value,
|
|
@@ -2282,7 +2322,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2282
2322
|
"modelValue",
|
|
2283
2323
|
"is-disabled",
|
|
2284
2324
|
"label"
|
|
2285
|
-
])) : t.definition.type === R(
|
|
2325
|
+
])) : t.definition.type === R(m).NUMBER ? (F(), O(Zr, {
|
|
2286
2326
|
key: 1,
|
|
2287
2327
|
id: t.id,
|
|
2288
2328
|
modelValue: R(a).number.value,
|
|
@@ -2297,7 +2337,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2297
2337
|
"modelValue",
|
|
2298
2338
|
"is-disabled",
|
|
2299
2339
|
"label"
|
|
2300
|
-
])) : t.definition.type === R(
|
|
2340
|
+
])) : t.definition.type === R(m).MONETARY ? (F(), O(Zr, {
|
|
2301
2341
|
key: 2,
|
|
2302
2342
|
id: t.id,
|
|
2303
2343
|
modelValue: R(a).monetary.value,
|
|
@@ -2316,7 +2356,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2316
2356
|
"label",
|
|
2317
2357
|
"prefix",
|
|
2318
2358
|
"suffix"
|
|
2319
|
-
])) : t.definition.type === R(
|
|
2359
|
+
])) : t.definition.type === R(m).SINGLE_SELECT ? (F(), O($r, {
|
|
2320
2360
|
key: 3,
|
|
2321
2361
|
id: t.id,
|
|
2322
2362
|
modelValue: R(a).singleSelect.value,
|
|
@@ -2333,7 +2373,7 @@ var qr = /* @__PURE__ */ N({
|
|
|
2333
2373
|
"is-disabled",
|
|
2334
2374
|
"label",
|
|
2335
2375
|
"options"
|
|
2336
|
-
])) : (F(), O(
|
|
2376
|
+
])) : (F(), O(Xr, {
|
|
2337
2377
|
key: 4,
|
|
2338
2378
|
modelValue: n.value,
|
|
2339
2379
|
"onUpdate:modelValue": r[4] ||= (e) => n.value = e,
|
|
@@ -2352,16 +2392,16 @@ var qr = /* @__PURE__ */ N({
|
|
|
2352
2392
|
"precision"
|
|
2353
2393
|
]));
|
|
2354
2394
|
}
|
|
2355
|
-
}),
|
|
2395
|
+
}), ti = ["data-line-item-row-id", "data-appearing"], ni = {
|
|
2356
2396
|
key: 0,
|
|
2357
2397
|
class: "relative overflow-visible px-xs py-none"
|
|
2358
|
-
},
|
|
2398
|
+
}, ri = { class: "p-none" }, ii = { class: "p-none" }, ai = { class: "p-none" }, oi = { class: "p-none" }, si = { class: "p-none" }, ci = {
|
|
2359
2399
|
key: 2,
|
|
2360
2400
|
class: "p-none"
|
|
2361
|
-
},
|
|
2401
|
+
}, li = { class: "px-lg py-none text-right text-sm text-secondary tabular-nums" }, ui = { class: "p-none" }, di = { class: "px-lg py-none text-right text-sm font-medium text-primary tabular-nums" }, fi = {
|
|
2362
2402
|
key: 3,
|
|
2363
2403
|
class: "px-md py-none"
|
|
2364
|
-
},
|
|
2404
|
+
}, pi = /*#__PURE__*/ Pe(/* @__PURE__ */ N({
|
|
2365
2405
|
__name: "BillingDocumentLineItemsTableRow",
|
|
2366
2406
|
props: {
|
|
2367
2407
|
isAppearing: { type: Boolean },
|
|
@@ -2369,45 +2409,45 @@ var qr = /* @__PURE__ */ N({
|
|
|
2369
2409
|
line: {},
|
|
2370
2410
|
net: {}
|
|
2371
2411
|
},
|
|
2372
|
-
setup(
|
|
2373
|
-
let
|
|
2412
|
+
setup(e) {
|
|
2413
|
+
let t = e, n = T(), r = _(), i = ee(), a = gn().create(Dr), o = ar(), c = or.map((e) => ({
|
|
2374
2414
|
label: `${Number(e)}%`,
|
|
2375
2415
|
value: e
|
|
2376
|
-
})),
|
|
2377
|
-
label:
|
|
2416
|
+
})), l = sr.map((e) => ({
|
|
2417
|
+
label: n.t(`wise_invoicing.invoice.detail.line_items.units.${e}`),
|
|
2378
2418
|
value: e
|
|
2379
|
-
})),
|
|
2380
|
-
initialState: D(() =>
|
|
2381
|
-
schema:
|
|
2419
|
+
})), u = D(() => r.getSymbol(o.meta.value.currency)), d = D(() => o.meta.value.documentType === s.CREDIT_NOTE).value ? qr : Kr, f = D(() => !o.isEditable.value || t.line.isDiscount), p = vn({
|
|
2420
|
+
initialState: D(() => ae(t.line)),
|
|
2421
|
+
schema: d,
|
|
2382
2422
|
onSubmit: (e) => {
|
|
2383
|
-
|
|
2423
|
+
oe(t.line, e) || o.mutations.updateAllFields(t.line.id, e);
|
|
2384
2424
|
}
|
|
2385
|
-
}),
|
|
2425
|
+
}), m = p.register("name"), h = p.register("description"), g = p.register("quantity"), v = p.register("unit"), y = p.register("unitPrice"), b = p.register("discountPercentage"), x = p.register("vatRate"), te = D(() => o.lineCustomFieldDefinitions.value.map((e) => ({
|
|
2386
2426
|
definition: e,
|
|
2387
|
-
value:
|
|
2427
|
+
value: Jr.findByDefinition(t.line.customFields, e.uuid)
|
|
2388
2428
|
})));
|
|
2389
|
-
function
|
|
2390
|
-
return `billing-document-line-items-${e}-${
|
|
2429
|
+
function S(e) {
|
|
2430
|
+
return `billing-document-line-items-${e}-${t.line.id}`;
|
|
2391
2431
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
2432
|
+
function C() {
|
|
2433
|
+
return t.line.name || t.line.description || n.t("wise_invoicing.invoice.detail.line_items.delete_dialog.line.unnamed");
|
|
2394
2434
|
}
|
|
2395
|
-
async function
|
|
2396
|
-
await
|
|
2397
|
-
name:
|
|
2435
|
+
async function ne() {
|
|
2436
|
+
await a.open({
|
|
2437
|
+
name: C(),
|
|
2398
2438
|
type: "line",
|
|
2399
2439
|
onDeleteLine: () => {
|
|
2400
|
-
|
|
2440
|
+
o.mutations.deleteLine(t.line.id);
|
|
2401
2441
|
}
|
|
2402
2442
|
});
|
|
2403
2443
|
}
|
|
2444
|
+
function re(e) {
|
|
2445
|
+
return r.format(o.meta.value.currency, vr.getDisplayNumber(o.meta.value.documentType, e));
|
|
2446
|
+
}
|
|
2404
2447
|
function ie(e) {
|
|
2405
|
-
return
|
|
2448
|
+
return r.format(o.meta.value.currency, vr.getDisplayGrossLineTotal(o.meta.value.documentType, e, t.line.isDiscount));
|
|
2406
2449
|
}
|
|
2407
2450
|
function ae(e) {
|
|
2408
|
-
return i.format(s.meta.value.currency, vr.getDisplayGrossLineTotal(s.meta.value.documentType, e, n.line.isDiscount));
|
|
2409
|
-
}
|
|
2410
|
-
function oe(e) {
|
|
2411
2451
|
return {
|
|
2412
2452
|
name: e.name,
|
|
2413
2453
|
description: e.description,
|
|
@@ -2418,52 +2458,52 @@ var qr = /* @__PURE__ */ N({
|
|
|
2418
2458
|
vatRate: e.vatRate
|
|
2419
2459
|
};
|
|
2420
2460
|
}
|
|
2421
|
-
function
|
|
2461
|
+
function oe(e, t) {
|
|
2422
2462
|
return e.name === t.name && e.description === t.description && e.quantity === t.quantity && e.unit === t.unit && e.unitPrice === t.unitPrice && (e.discountPercentage?.getValue() ?? null) === t.discountPercentage && e.vatRate === t.vatRate;
|
|
2423
2463
|
}
|
|
2424
|
-
return mt(() => [
|
|
2425
|
-
!
|
|
2426
|
-
}, { deep: !0 }), (e,
|
|
2427
|
-
"data-line-item-row-id":
|
|
2428
|
-
"data-appearing":
|
|
2464
|
+
return mt(() => [p.state.value, p.isValid.value], async () => {
|
|
2465
|
+
!o.isEditable.value || !p.isValid.value || oe(t.line, p.state.value) || await p.submit();
|
|
2466
|
+
}, { deep: !0 }), (e, r) => (F(), A("tr", {
|
|
2467
|
+
"data-line-item-row-id": t.line.id,
|
|
2468
|
+
"data-appearing": t.isAppearing ? "true" : void 0,
|
|
2429
2469
|
class: "group/row h-11 border-b border-secondary align-middle transition-colors hover:bg-secondary motion-reduce:transition-none",
|
|
2430
2470
|
"data-line-item-row-type": "line",
|
|
2431
2471
|
"data-line-item-row": ""
|
|
2432
2472
|
}, [
|
|
2433
|
-
R(
|
|
2434
|
-
R(
|
|
2473
|
+
R(o).isEditable.value ? (F(), A("td", ni, [M(kr)])) : k("", !0),
|
|
2474
|
+
R(o).isEditable.value ? (F(), A("td", {
|
|
2435
2475
|
key: 1,
|
|
2436
|
-
class: Qe([
|
|
2476
|
+
class: Qe([t.line.groupId === null ? "px-xs" : "pr-xs pl-lg", "py-none text-center"])
|
|
2437
2477
|
}, [M(R(Ot), {
|
|
2438
|
-
id:
|
|
2439
|
-
"model-value": R(
|
|
2440
|
-
label: R(
|
|
2478
|
+
id: S("select-row"),
|
|
2479
|
+
"model-value": R(o).selection.isSelected(t.line.id),
|
|
2480
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.item"),
|
|
2441
2481
|
"is-label-hidden": !0,
|
|
2442
|
-
"is-disabled": !R(
|
|
2443
|
-
"onUpdate:modelValue":
|
|
2482
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2483
|
+
"onUpdate:modelValue": r[0] ||= (e) => R(o).selection.toggleRow(t.line.id)
|
|
2444
2484
|
}, null, 8, [
|
|
2445
2485
|
"id",
|
|
2446
2486
|
"model-value",
|
|
2447
2487
|
"label",
|
|
2448
2488
|
"is-disabled"
|
|
2449
2489
|
])], 2)) : k("", !0),
|
|
2450
|
-
j("td",
|
|
2451
|
-
id:
|
|
2452
|
-
label: R(
|
|
2453
|
-
placeholder: R(
|
|
2454
|
-
"is-disabled": !R(
|
|
2455
|
-
}, R(Ne)(R(
|
|
2490
|
+
j("td", ri, [j("div", { class: Qe(t.line.groupId === null ? void 0 : "\n ml-sm border-l-2 border-secondary pl-md\n ") }, [M(Lr, P({
|
|
2491
|
+
id: S("name"),
|
|
2492
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.item"),
|
|
2493
|
+
placeholder: R(n).t("wise_invoicing.invoice.detail.line_items.item_placeholder"),
|
|
2494
|
+
"is-disabled": !R(o).isEditable.value
|
|
2495
|
+
}, R(Ne)(R(m))), null, 16, [
|
|
2456
2496
|
"id",
|
|
2457
2497
|
"label",
|
|
2458
2498
|
"placeholder",
|
|
2459
2499
|
"is-disabled"
|
|
2460
2500
|
])], 2)]),
|
|
2461
|
-
j("td",
|
|
2462
|
-
id:
|
|
2463
|
-
label: R(
|
|
2464
|
-
placeholder: R(
|
|
2465
|
-
"is-disabled": !R(
|
|
2466
|
-
}, R(Ne)(R(
|
|
2501
|
+
j("td", ii, [M(Lr, P({
|
|
2502
|
+
id: S("description"),
|
|
2503
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.item_description"),
|
|
2504
|
+
placeholder: R(n).t("wise_invoicing.invoice.detail.line_items.item_description_placeholder"),
|
|
2505
|
+
"is-disabled": !R(o).isEditable.value
|
|
2506
|
+
}, R(Ne)(R(h))), null, 16, [
|
|
2467
2507
|
"id",
|
|
2468
2508
|
"label",
|
|
2469
2509
|
"placeholder",
|
|
@@ -2472,14 +2512,14 @@ var qr = /* @__PURE__ */ N({
|
|
|
2472
2512
|
(F(!0), A(E, null, ot(te.value, (e) => (F(), A("td", {
|
|
2473
2513
|
key: e.definition.uuid,
|
|
2474
2514
|
class: "p-none"
|
|
2475
|
-
}, [R(
|
|
2515
|
+
}, [R(o).isEditable.value ? (F(), O(ei, {
|
|
2476
2516
|
key: 0,
|
|
2477
|
-
id:
|
|
2478
|
-
currency: R(
|
|
2517
|
+
id: S(`custom-field-${e.definition.uuid}`),
|
|
2518
|
+
currency: R(o).meta.value.currency,
|
|
2479
2519
|
definition: e.definition,
|
|
2480
2520
|
"is-disabled": !0,
|
|
2481
2521
|
"model-value": e.value,
|
|
2482
|
-
precision: R(
|
|
2522
|
+
precision: R(o).meta.value.precision
|
|
2483
2523
|
}, null, 8, [
|
|
2484
2524
|
"id",
|
|
2485
2525
|
"currency",
|
|
@@ -2493,90 +2533,90 @@ var qr = /* @__PURE__ */ N({
|
|
|
2493
2533
|
class: "px-lg",
|
|
2494
2534
|
size: "md"
|
|
2495
2535
|
}, null, 8, ["definition", "value"]))]))), 128)),
|
|
2496
|
-
j("td",
|
|
2497
|
-
id:
|
|
2498
|
-
"is-disabled": !R(
|
|
2499
|
-
label: R(
|
|
2536
|
+
j("td", ai, [M(Zr, P({
|
|
2537
|
+
id: S("quantity"),
|
|
2538
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2539
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.qty"),
|
|
2500
2540
|
step: "0.01"
|
|
2501
|
-
}, R(Ne)(R(
|
|
2541
|
+
}, R(Ne)(R(g))), null, 16, [
|
|
2502
2542
|
"id",
|
|
2503
2543
|
"is-disabled",
|
|
2504
2544
|
"label"
|
|
2505
2545
|
])]),
|
|
2506
|
-
j("td",
|
|
2507
|
-
id:
|
|
2508
|
-
"is-disabled": !R(
|
|
2509
|
-
label: R(
|
|
2510
|
-
options: R(
|
|
2511
|
-
}, R(Ne)(R(
|
|
2546
|
+
j("td", oi, [M($r, P({
|
|
2547
|
+
id: S("unit"),
|
|
2548
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2549
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.unit"),
|
|
2550
|
+
options: R(l)
|
|
2551
|
+
}, R(Ne)(R(v))), null, 16, [
|
|
2512
2552
|
"id",
|
|
2513
2553
|
"is-disabled",
|
|
2514
2554
|
"label",
|
|
2515
2555
|
"options"
|
|
2516
2556
|
])]),
|
|
2517
|
-
j("td",
|
|
2518
|
-
id:
|
|
2519
|
-
"is-disabled": !R(
|
|
2520
|
-
label: R(
|
|
2521
|
-
prefix:
|
|
2522
|
-
suffix:
|
|
2557
|
+
j("td", si, [M(Zr, P({
|
|
2558
|
+
id: S("unit-price"),
|
|
2559
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2560
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.unit_price"),
|
|
2561
|
+
prefix: u.value.position === "prefix" ? u.value.symbol : void 0,
|
|
2562
|
+
suffix: u.value.position === "suffix" ? u.value.symbol : void 0,
|
|
2523
2563
|
min: "0",
|
|
2524
2564
|
step: "0.01"
|
|
2525
|
-
}, R(Ne)(R(
|
|
2565
|
+
}, R(Ne)(R(y))), null, 16, [
|
|
2526
2566
|
"id",
|
|
2527
2567
|
"is-disabled",
|
|
2528
2568
|
"label",
|
|
2529
2569
|
"prefix",
|
|
2530
2570
|
"suffix"
|
|
2531
2571
|
])]),
|
|
2532
|
-
R(
|
|
2533
|
-
id:
|
|
2534
|
-
label: R(
|
|
2535
|
-
"is-disabled":
|
|
2572
|
+
R(i).isLineDiscountEnabled.value ? (F(), A("td", ci, [M(Zr, P({
|
|
2573
|
+
id: S("discount"),
|
|
2574
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.discount"),
|
|
2575
|
+
"is-disabled": f.value,
|
|
2536
2576
|
placeholder: "-",
|
|
2537
2577
|
min: "0",
|
|
2538
2578
|
max: "100",
|
|
2539
2579
|
step: "0.01",
|
|
2540
2580
|
suffix: "%"
|
|
2541
|
-
}, R(Ne)(R(
|
|
2581
|
+
}, R(Ne)(R(b))), null, 16, [
|
|
2542
2582
|
"id",
|
|
2543
2583
|
"label",
|
|
2544
2584
|
"is-disabled"
|
|
2545
2585
|
])])) : k("", !0),
|
|
2546
|
-
j("td",
|
|
2547
|
-
j("td",
|
|
2548
|
-
id:
|
|
2549
|
-
"is-disabled": !R(
|
|
2550
|
-
label: R(
|
|
2551
|
-
options: R(
|
|
2552
|
-
}, R(Ne)(R(
|
|
2586
|
+
j("td", li, L(re(t.net)), 1),
|
|
2587
|
+
j("td", ui, [M($r, P({
|
|
2588
|
+
id: S("vat-rate"),
|
|
2589
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2590
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.vat"),
|
|
2591
|
+
options: R(c)
|
|
2592
|
+
}, R(Ne)(R(x))), null, 16, [
|
|
2553
2593
|
"id",
|
|
2554
2594
|
"is-disabled",
|
|
2555
2595
|
"label",
|
|
2556
2596
|
"options"
|
|
2557
2597
|
])]),
|
|
2558
|
-
j("td",
|
|
2559
|
-
R(
|
|
2598
|
+
j("td", di, L(ie(t.gross)), 1),
|
|
2599
|
+
R(o).isEditable.value ? (F(), A("td", fi, [M(R(B), {
|
|
2560
2600
|
justify: "end",
|
|
2561
2601
|
gap: "xxs",
|
|
2562
2602
|
class: "opacity-0 transition group-focus-within/row:opacity-100 group-hover/row:opacity-100"
|
|
2563
2603
|
}, {
|
|
2564
2604
|
default: z(() => [M(R(Yt), {
|
|
2565
|
-
icon: R(
|
|
2566
|
-
"is-disabled": !R(
|
|
2567
|
-
label: R(
|
|
2605
|
+
icon: R(he),
|
|
2606
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2607
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.duplicate"),
|
|
2568
2608
|
variant: "tertiary",
|
|
2569
|
-
onClick:
|
|
2609
|
+
onClick: r[1] ||= (e) => R(o).mutations.duplicateLine(t.line.id)
|
|
2570
2610
|
}, null, 8, [
|
|
2571
2611
|
"icon",
|
|
2572
2612
|
"is-disabled",
|
|
2573
2613
|
"label"
|
|
2574
2614
|
]), M(R(Yt), {
|
|
2575
|
-
icon: R(
|
|
2576
|
-
"is-disabled": !R(
|
|
2577
|
-
label: R(
|
|
2615
|
+
icon: R(pe),
|
|
2616
|
+
"is-disabled": !R(o).isEditable.value,
|
|
2617
|
+
label: R(n).t("wise_invoicing.invoice.detail.line_items.delete"),
|
|
2578
2618
|
variant: "destructive-tertiary",
|
|
2579
|
-
onClick:
|
|
2619
|
+
onClick: ne
|
|
2580
2620
|
}, null, 8, [
|
|
2581
2621
|
"icon",
|
|
2582
2622
|
"is-disabled",
|
|
@@ -2584,10 +2624,10 @@ var qr = /* @__PURE__ */ N({
|
|
|
2584
2624
|
])]),
|
|
2585
2625
|
_: 1
|
|
2586
2626
|
})])) : k("", !0)
|
|
2587
|
-
], 8,
|
|
2627
|
+
], 8, ti));
|
|
2588
2628
|
}
|
|
2589
|
-
}), [["__scopeId", "data-v-
|
|
2590
|
-
function
|
|
2629
|
+
}), [["__scopeId", "data-v-63093404"]]), mi = "input, [role=\"combobox\"]", hi = "[data-line-item-row][data-line-item-row-type=\"line\"]";
|
|
2630
|
+
function gi(e) {
|
|
2591
2631
|
return e.key === "Escape" ? { type: "blur" } : e.hasPrimaryModifier && (e.key === "d" || e.key === "D") ? { type: "duplicate" } : e.key === "Enter" ? { type: "addLine" } : e.key === "Backspace" ? e.colIndex === 0 && e.isFieldEmpty && e.atStart ? { type: "deleteEmpty" } : null : e.key === "ArrowUp" ? e.rowIndex > 0 ? {
|
|
2592
2632
|
colIndex: e.colIndex,
|
|
2593
2633
|
rowIndex: e.rowIndex - 1,
|
|
@@ -2606,10 +2646,10 @@ function pi(e) {
|
|
|
2606
2646
|
type: "focusCell"
|
|
2607
2647
|
} : null;
|
|
2608
2648
|
}
|
|
2609
|
-
function
|
|
2610
|
-
return Array.from(e.querySelectorAll(
|
|
2649
|
+
function _i(e) {
|
|
2650
|
+
return Array.from(e.querySelectorAll(mi));
|
|
2611
2651
|
}
|
|
2612
|
-
function
|
|
2652
|
+
function vi(e) {
|
|
2613
2653
|
let t = e.value === "";
|
|
2614
2654
|
if (e.type === "number") return {
|
|
2615
2655
|
isEmpty: t,
|
|
@@ -2628,20 +2668,20 @@ function hi(e) {
|
|
|
2628
2668
|
atStart: n === null || n === 0
|
|
2629
2669
|
};
|
|
2630
2670
|
}
|
|
2631
|
-
function
|
|
2671
|
+
function yi(e) {
|
|
2632
2672
|
function t() {
|
|
2633
|
-
return Array.from(e.tbodyRef.value?.querySelectorAll(
|
|
2673
|
+
return Array.from(e.tbodyRef.value?.querySelectorAll(hi) ?? []);
|
|
2634
2674
|
}
|
|
2635
2675
|
function n(t, n) {
|
|
2636
2676
|
let r = e.tbodyRef.value?.querySelector(`[data-line-item-row-id="${t}"]`);
|
|
2637
2677
|
if (r == null) return;
|
|
2638
|
-
let i =
|
|
2678
|
+
let i = _i(r);
|
|
2639
2679
|
i[Math.min(n, i.length - 1)]?.focus();
|
|
2640
2680
|
}
|
|
2641
2681
|
function r(e, n) {
|
|
2642
2682
|
let r = t()[e];
|
|
2643
2683
|
if (r === void 0) return;
|
|
2644
|
-
let i =
|
|
2684
|
+
let i = _i(r);
|
|
2645
2685
|
i[Math.min(n, i.length - 1)]?.focus();
|
|
2646
2686
|
}
|
|
2647
2687
|
function i(n) {
|
|
@@ -2650,15 +2690,15 @@ function gi(e) {
|
|
|
2650
2690
|
if (!(i instanceof HTMLElement)) return;
|
|
2651
2691
|
let o = i instanceof HTMLInputElement ? i : null, s = o === null ? i.closest("[role=\"combobox\"]") : null, c = o ?? s;
|
|
2652
2692
|
if (c === null || s !== null && s.getAttribute("aria-expanded") === "true") return;
|
|
2653
|
-
let l = c.closest(
|
|
2693
|
+
let l = c.closest(hi), u = l?.dataset.lineItemRowId;
|
|
2654
2694
|
if (l == null || u === void 0) return;
|
|
2655
|
-
let d = t(), f = d.indexOf(l), p =
|
|
2695
|
+
let d = t(), f = d.indexOf(l), p = _i(l), m = p.indexOf(c);
|
|
2656
2696
|
if (f === -1 || m === -1) return;
|
|
2657
2697
|
let h = o === null ? {
|
|
2658
2698
|
isEmpty: !1,
|
|
2659
2699
|
atEnd: !0,
|
|
2660
2700
|
atStart: !0
|
|
2661
|
-
} :
|
|
2701
|
+
} : vi(o), g = gi({
|
|
2662
2702
|
hasPrimaryModifier: n.metaKey || n.ctrlKey,
|
|
2663
2703
|
isFieldEmpty: h.isEmpty,
|
|
2664
2704
|
atEnd: h.atEnd,
|
|
@@ -2696,83 +2736,83 @@ function gi(e) {
|
|
|
2696
2736
|
}
|
|
2697
2737
|
//#endregion
|
|
2698
2738
|
//#region ../../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2699
|
-
var
|
|
2739
|
+
var bi = Object.defineProperty, xi = Object.getOwnPropertySymbols, Si = Object.prototype.hasOwnProperty, Ci = Object.prototype.propertyIsEnumerable, wi = (e, t, n) => t in e ? bi(e, t, {
|
|
2700
2740
|
enumerable: !0,
|
|
2701
2741
|
configurable: !0,
|
|
2702
2742
|
writable: !0,
|
|
2703
2743
|
value: n
|
|
2704
|
-
}) : e[t] = n,
|
|
2705
|
-
for (var n in t ||= {})
|
|
2706
|
-
if (
|
|
2744
|
+
}) : e[t] = n, Ti = (e, t) => {
|
|
2745
|
+
for (var n in t ||= {}) Si.call(t, n) && wi(e, n, t[n]);
|
|
2746
|
+
if (xi) for (var n of xi(t)) Ci.call(t, n) && wi(e, n, t[n]);
|
|
2707
2747
|
return e;
|
|
2708
|
-
},
|
|
2748
|
+
}, Ei = (e, t) => {
|
|
2709
2749
|
var n = {};
|
|
2710
|
-
for (var r in e)
|
|
2711
|
-
if (e != null &&
|
|
2750
|
+
for (var r in e) Si.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2751
|
+
if (e != null && xi) for (var r of xi(e)) t.indexOf(r) < 0 && Ci.call(e, r) && (n[r] = e[r]);
|
|
2712
2752
|
return n;
|
|
2713
|
-
},
|
|
2714
|
-
function
|
|
2715
|
-
console.warn(
|
|
2753
|
+
}, Di = "[vue-draggable-plus]: ";
|
|
2754
|
+
function Oi(e) {
|
|
2755
|
+
console.warn(Di + e);
|
|
2716
2756
|
}
|
|
2717
|
-
function
|
|
2718
|
-
console.error(
|
|
2757
|
+
function ki(e) {
|
|
2758
|
+
console.error(Di + e);
|
|
2719
2759
|
}
|
|
2720
|
-
function
|
|
2760
|
+
function Ai(e, t, n) {
|
|
2721
2761
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2722
2762
|
}
|
|
2723
|
-
function
|
|
2763
|
+
function ji(e) {
|
|
2724
2764
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2725
2765
|
}
|
|
2726
|
-
function
|
|
2727
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2766
|
+
function Mi(e) {
|
|
2767
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[ji(n)] = e[n]), t), {});
|
|
2728
2768
|
}
|
|
2729
|
-
function
|
|
2769
|
+
function Ni(e, t) {
|
|
2730
2770
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2731
2771
|
}
|
|
2732
|
-
function
|
|
2772
|
+
function Pi(e, t, n) {
|
|
2733
2773
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2734
2774
|
}
|
|
2735
|
-
function
|
|
2775
|
+
function Fi(e) {
|
|
2736
2776
|
return e === void 0;
|
|
2737
2777
|
}
|
|
2738
|
-
function
|
|
2778
|
+
function Ii(e) {
|
|
2739
2779
|
return typeof e == "string";
|
|
2740
2780
|
}
|
|
2741
|
-
function
|
|
2781
|
+
function Li(e, t, n) {
|
|
2742
2782
|
let r = e.children[n];
|
|
2743
2783
|
e.insertBefore(t, r);
|
|
2744
2784
|
}
|
|
2745
|
-
function
|
|
2785
|
+
function Ri(e) {
|
|
2746
2786
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2747
2787
|
}
|
|
2748
|
-
function
|
|
2788
|
+
function zi(e, t = document) {
|
|
2749
2789
|
let n = null;
|
|
2750
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2790
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Oi(`Element not found: ${e}`), n;
|
|
2751
2791
|
}
|
|
2752
|
-
function
|
|
2792
|
+
function Bi(e, t, n = null) {
|
|
2753
2793
|
return function(...r) {
|
|
2754
2794
|
return e.apply(n, r), t.apply(n, r);
|
|
2755
2795
|
};
|
|
2756
2796
|
}
|
|
2757
|
-
function
|
|
2758
|
-
let n =
|
|
2797
|
+
function Vi(e, t) {
|
|
2798
|
+
let n = Ti({}, e);
|
|
2759
2799
|
return Object.keys(t).forEach((r) => {
|
|
2760
|
-
n[r] ? n[r] =
|
|
2800
|
+
n[r] ? n[r] = Bi(e[r], t[r]) : n[r] = t[r];
|
|
2761
2801
|
}), n;
|
|
2762
2802
|
}
|
|
2763
|
-
function
|
|
2803
|
+
function Hi(e) {
|
|
2764
2804
|
return e instanceof HTMLElement;
|
|
2765
2805
|
}
|
|
2766
|
-
function
|
|
2806
|
+
function Ui(e, t) {
|
|
2767
2807
|
Object.keys(e).forEach((n) => {
|
|
2768
2808
|
t(n, e[n]);
|
|
2769
2809
|
});
|
|
2770
2810
|
}
|
|
2771
|
-
function
|
|
2811
|
+
function Wi(e) {
|
|
2772
2812
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2773
2813
|
}
|
|
2774
|
-
var
|
|
2775
|
-
function
|
|
2814
|
+
var Gi = Object.assign;
|
|
2815
|
+
function Ki(e, t) {
|
|
2776
2816
|
var n = Object.keys(e);
|
|
2777
2817
|
if (Object.getOwnPropertySymbols) {
|
|
2778
2818
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2782,26 +2822,26 @@ function Ui(e, t) {
|
|
|
2782
2822
|
}
|
|
2783
2823
|
return n;
|
|
2784
2824
|
}
|
|
2785
|
-
function
|
|
2825
|
+
function qi(e) {
|
|
2786
2826
|
for (var t = 1; t < arguments.length; t++) {
|
|
2787
2827
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2788
|
-
t % 2 ?
|
|
2789
|
-
|
|
2790
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2828
|
+
t % 2 ? Ki(Object(n), !0).forEach(function(t) {
|
|
2829
|
+
Yi(e, t, n[t]);
|
|
2830
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ki(Object(n)).forEach(function(t) {
|
|
2791
2831
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2792
2832
|
});
|
|
2793
2833
|
}
|
|
2794
2834
|
return e;
|
|
2795
2835
|
}
|
|
2796
|
-
function
|
|
2836
|
+
function Ji(e) {
|
|
2797
2837
|
"@babel/helpers - typeof";
|
|
2798
|
-
return
|
|
2838
|
+
return Ji = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2799
2839
|
return typeof e;
|
|
2800
2840
|
} : function(e) {
|
|
2801
2841
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2802
|
-
},
|
|
2842
|
+
}, Ji(e);
|
|
2803
2843
|
}
|
|
2804
|
-
function
|
|
2844
|
+
function Yi(e, t, n) {
|
|
2805
2845
|
return t in e ? Object.defineProperty(e, t, {
|
|
2806
2846
|
value: n,
|
|
2807
2847
|
enumerable: !0,
|
|
@@ -2809,45 +2849,45 @@ function Ki(e, t, n) {
|
|
|
2809
2849
|
writable: !0
|
|
2810
2850
|
}) : e[t] = n, e;
|
|
2811
2851
|
}
|
|
2812
|
-
function
|
|
2813
|
-
return
|
|
2852
|
+
function Xi() {
|
|
2853
|
+
return Xi = Object.assign || function(e) {
|
|
2814
2854
|
for (var t = 1; t < arguments.length; t++) {
|
|
2815
2855
|
var n = arguments[t];
|
|
2816
2856
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2817
2857
|
}
|
|
2818
2858
|
return e;
|
|
2819
|
-
},
|
|
2859
|
+
}, Xi.apply(this, arguments);
|
|
2820
2860
|
}
|
|
2821
|
-
function
|
|
2861
|
+
function Zi(e, t) {
|
|
2822
2862
|
if (e == null) return {};
|
|
2823
2863
|
var n = {}, r = Object.keys(e), i, a;
|
|
2824
2864
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2825
2865
|
return n;
|
|
2826
2866
|
}
|
|
2827
|
-
function
|
|
2867
|
+
function Qi(e, t) {
|
|
2828
2868
|
if (e == null) return {};
|
|
2829
|
-
var n =
|
|
2869
|
+
var n = Zi(e, t), r, i;
|
|
2830
2870
|
if (Object.getOwnPropertySymbols) {
|
|
2831
2871
|
var a = Object.getOwnPropertySymbols(e);
|
|
2832
2872
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2833
2873
|
}
|
|
2834
2874
|
return n;
|
|
2835
2875
|
}
|
|
2836
|
-
var
|
|
2837
|
-
function
|
|
2876
|
+
var $i = "1.15.2";
|
|
2877
|
+
function ea(e) {
|
|
2838
2878
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2839
2879
|
}
|
|
2840
|
-
var
|
|
2880
|
+
var ta = ea(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), na = ea(/Edge/i), ra = ea(/firefox/i), ia = ea(/safari/i) && !ea(/chrome/i) && !ea(/android/i), aa = ea(/iP(ad|od|hone)/i), oa = ea(/chrome/i) && ea(/android/i), sa = {
|
|
2841
2881
|
capture: !1,
|
|
2842
2882
|
passive: !1
|
|
2843
2883
|
};
|
|
2844
2884
|
function U(e, t, n) {
|
|
2845
|
-
e.addEventListener(t, n, !
|
|
2885
|
+
e.addEventListener(t, n, !ta && sa);
|
|
2846
2886
|
}
|
|
2847
2887
|
function W(e, t, n) {
|
|
2848
|
-
e.removeEventListener(t, n, !
|
|
2888
|
+
e.removeEventListener(t, n, !ta && sa);
|
|
2849
2889
|
}
|
|
2850
|
-
function
|
|
2890
|
+
function ca(e, t) {
|
|
2851
2891
|
if (t) {
|
|
2852
2892
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2853
2893
|
if (e.matches) return e.matches(t);
|
|
@@ -2859,22 +2899,22 @@ function aa(e, t) {
|
|
|
2859
2899
|
return !1;
|
|
2860
2900
|
}
|
|
2861
2901
|
}
|
|
2862
|
-
function
|
|
2902
|
+
function la(e) {
|
|
2863
2903
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2864
2904
|
}
|
|
2865
|
-
function
|
|
2905
|
+
function ua(e, t, n, r) {
|
|
2866
2906
|
if (e) {
|
|
2867
2907
|
n ||= document;
|
|
2868
2908
|
do {
|
|
2869
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2909
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ca(e, t) : ca(e, t)) || r && e === n) return e;
|
|
2870
2910
|
if (e === n) break;
|
|
2871
|
-
} while (e =
|
|
2911
|
+
} while (e = la(e));
|
|
2872
2912
|
}
|
|
2873
2913
|
return null;
|
|
2874
2914
|
}
|
|
2875
|
-
var
|
|
2876
|
-
function
|
|
2877
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2915
|
+
var da = /\s+/g;
|
|
2916
|
+
function fa(e, t, n) {
|
|
2917
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(da, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(da, " "));
|
|
2878
2918
|
}
|
|
2879
2919
|
function G(e, t, n) {
|
|
2880
2920
|
var r = e && e.style;
|
|
@@ -2883,7 +2923,7 @@ function G(e, t, n) {
|
|
|
2883
2923
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2884
2924
|
}
|
|
2885
2925
|
}
|
|
2886
|
-
function
|
|
2926
|
+
function pa(e, t) {
|
|
2887
2927
|
var n = "";
|
|
2888
2928
|
if (typeof e == "string") n = e;
|
|
2889
2929
|
else do {
|
|
@@ -2893,7 +2933,7 @@ function ua(e, t) {
|
|
|
2893
2933
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2894
2934
|
return i && new i(n);
|
|
2895
2935
|
}
|
|
2896
|
-
function
|
|
2936
|
+
function ma(e, t, n) {
|
|
2897
2937
|
if (e) {
|
|
2898
2938
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2899
2939
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2901,13 +2941,13 @@ function da(e, t, n) {
|
|
|
2901
2941
|
}
|
|
2902
2942
|
return [];
|
|
2903
2943
|
}
|
|
2904
|
-
function
|
|
2944
|
+
function ha() {
|
|
2905
2945
|
return document.scrollingElement || document.documentElement;
|
|
2906
2946
|
}
|
|
2907
2947
|
function K(e, t, n, r, i) {
|
|
2908
2948
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2909
2949
|
var a, o, s, c, l, u, d;
|
|
2910
|
-
if (e !== window && e.parentNode && e !==
|
|
2950
|
+
if (e !== window && e.parentNode && e !== ha() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !ta)) do
|
|
2911
2951
|
if (i && i.getBoundingClientRect && (G(i, "transform") !== "none" || n && G(i, "position") !== "static")) {
|
|
2912
2952
|
var f = i.getBoundingClientRect();
|
|
2913
2953
|
o -= f.top + parseInt(G(i, "border-top-width")), s -= f.left + parseInt(G(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2915,7 +2955,7 @@ function K(e, t, n, r, i) {
|
|
|
2915
2955
|
}
|
|
2916
2956
|
while (i = i.parentNode);
|
|
2917
2957
|
if (r && e !== window) {
|
|
2918
|
-
var p =
|
|
2958
|
+
var p = pa(i || e), m = p && p.a, h = p && p.d;
|
|
2919
2959
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2920
2960
|
}
|
|
2921
2961
|
return {
|
|
@@ -2928,18 +2968,18 @@ function K(e, t, n, r, i) {
|
|
|
2928
2968
|
};
|
|
2929
2969
|
}
|
|
2930
2970
|
}
|
|
2931
|
-
function
|
|
2932
|
-
for (var r =
|
|
2971
|
+
function ga(e, t, n) {
|
|
2972
|
+
for (var r = Sa(e, !0), i = K(e)[t]; r;) {
|
|
2933
2973
|
var a = K(r)[n], o = void 0;
|
|
2934
2974
|
if (o = i >= a, !o) return r;
|
|
2935
|
-
if (r ===
|
|
2936
|
-
r =
|
|
2975
|
+
if (r === ha()) break;
|
|
2976
|
+
r = Sa(r, !1);
|
|
2937
2977
|
}
|
|
2938
2978
|
return !1;
|
|
2939
2979
|
}
|
|
2940
|
-
function
|
|
2980
|
+
function _a(e, t, n, r) {
|
|
2941
2981
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2942
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2982
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && ua(o[a], n.draggable, e, !1)) {
|
|
2943
2983
|
if (i === t) return o[a];
|
|
2944
2984
|
i++;
|
|
2945
2985
|
}
|
|
@@ -2947,84 +2987,84 @@ function ma(e, t, n, r) {
|
|
|
2947
2987
|
}
|
|
2948
2988
|
return null;
|
|
2949
2989
|
}
|
|
2950
|
-
function
|
|
2951
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || G(n, "display") === "none" || t && !
|
|
2990
|
+
function va(e, t) {
|
|
2991
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || G(n, "display") === "none" || t && !ca(n, t));) n = n.previousElementSibling;
|
|
2952
2992
|
return n || null;
|
|
2953
2993
|
}
|
|
2954
|
-
function
|
|
2994
|
+
function ya(e, t) {
|
|
2955
2995
|
var n = 0;
|
|
2956
2996
|
if (!e || !e.parentNode) return -1;
|
|
2957
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2997
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ca(e, t)) && n++;
|
|
2958
2998
|
return n;
|
|
2959
2999
|
}
|
|
2960
|
-
function
|
|
2961
|
-
var t = 0, n = 0, r =
|
|
3000
|
+
function ba(e) {
|
|
3001
|
+
var t = 0, n = 0, r = ha();
|
|
2962
3002
|
if (e) do {
|
|
2963
|
-
var i =
|
|
3003
|
+
var i = pa(e), a = i.a, o = i.d;
|
|
2964
3004
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2965
3005
|
} while (e !== r && (e = e.parentNode));
|
|
2966
3006
|
return [t, n];
|
|
2967
3007
|
}
|
|
2968
|
-
function
|
|
3008
|
+
function xa(e, t) {
|
|
2969
3009
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2970
3010
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2971
3011
|
}
|
|
2972
3012
|
return -1;
|
|
2973
3013
|
}
|
|
2974
|
-
function
|
|
2975
|
-
if (!e || !e.getBoundingClientRect) return
|
|
3014
|
+
function Sa(e, t) {
|
|
3015
|
+
if (!e || !e.getBoundingClientRect) return ha();
|
|
2976
3016
|
var n = e, r = !1;
|
|
2977
3017
|
do
|
|
2978
3018
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2979
3019
|
var i = G(n);
|
|
2980
3020
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2981
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
3021
|
+
if (!n.getBoundingClientRect || n === document.body) return ha();
|
|
2982
3022
|
if (r || t) return n;
|
|
2983
3023
|
r = !0;
|
|
2984
3024
|
}
|
|
2985
3025
|
}
|
|
2986
3026
|
while (n = n.parentNode);
|
|
2987
|
-
return
|
|
3027
|
+
return ha();
|
|
2988
3028
|
}
|
|
2989
|
-
function
|
|
3029
|
+
function Ca(e, t) {
|
|
2990
3030
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2991
3031
|
return e;
|
|
2992
3032
|
}
|
|
2993
|
-
function
|
|
3033
|
+
function wa(e, t) {
|
|
2994
3034
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2995
3035
|
}
|
|
2996
|
-
var
|
|
2997
|
-
function
|
|
3036
|
+
var Ta;
|
|
3037
|
+
function Ea(e, t) {
|
|
2998
3038
|
return function() {
|
|
2999
|
-
if (!
|
|
3039
|
+
if (!Ta) {
|
|
3000
3040
|
var n = arguments, r = this;
|
|
3001
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
3002
|
-
|
|
3041
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ta = setTimeout(function() {
|
|
3042
|
+
Ta = void 0;
|
|
3003
3043
|
}, t);
|
|
3004
3044
|
}
|
|
3005
3045
|
};
|
|
3006
3046
|
}
|
|
3007
|
-
function
|
|
3008
|
-
clearTimeout(
|
|
3047
|
+
function Da() {
|
|
3048
|
+
clearTimeout(Ta), Ta = void 0;
|
|
3009
3049
|
}
|
|
3010
|
-
function
|
|
3050
|
+
function Oa(e, t, n) {
|
|
3011
3051
|
e.scrollLeft += t, e.scrollTop += n;
|
|
3012
3052
|
}
|
|
3013
|
-
function
|
|
3053
|
+
function ka(e) {
|
|
3014
3054
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
3015
3055
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
3016
3056
|
}
|
|
3017
|
-
function
|
|
3057
|
+
function Aa(e, t, n) {
|
|
3018
3058
|
var r = {};
|
|
3019
3059
|
return Array.from(e.children).forEach(function(i) {
|
|
3020
|
-
if (!(!
|
|
3060
|
+
if (!(!ua(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
3021
3061
|
var a = K(i);
|
|
3022
3062
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
3023
3063
|
}
|
|
3024
3064
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
3025
3065
|
}
|
|
3026
|
-
var
|
|
3027
|
-
function
|
|
3066
|
+
var ja = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
3067
|
+
function Ma() {
|
|
3028
3068
|
var e = [], t;
|
|
3029
3069
|
return {
|
|
3030
3070
|
captureAnimationState: function() {
|
|
@@ -3034,9 +3074,9 @@ function ka() {
|
|
|
3034
3074
|
target: t,
|
|
3035
3075
|
rect: K(t)
|
|
3036
3076
|
});
|
|
3037
|
-
var n =
|
|
3077
|
+
var n = qi({}, e[e.length - 1].rect);
|
|
3038
3078
|
if (t.thisAnimationDuration) {
|
|
3039
|
-
var r =
|
|
3079
|
+
var r = pa(t, !0);
|
|
3040
3080
|
r && (n.top -= r.f, n.left -= r.e);
|
|
3041
3081
|
}
|
|
3042
3082
|
t.fromRect = n;
|
|
@@ -3047,7 +3087,7 @@ function ka() {
|
|
|
3047
3087
|
e.push(t);
|
|
3048
3088
|
},
|
|
3049
3089
|
removeAnimationState: function(t) {
|
|
3050
|
-
e.splice(
|
|
3090
|
+
e.splice(xa(e, { target: t }), 1);
|
|
3051
3091
|
},
|
|
3052
3092
|
animateAll: function(n) {
|
|
3053
3093
|
var r = this;
|
|
@@ -3057,8 +3097,8 @@ function ka() {
|
|
|
3057
3097
|
}
|
|
3058
3098
|
var i = !1, a = 0;
|
|
3059
3099
|
e.forEach(function(e) {
|
|
3060
|
-
var t = 0, n = e.target, o = n.fromRect, s = K(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
3061
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
3100
|
+
var t = 0, n = e.target, o = n.fromRect, s = K(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = pa(n, !0);
|
|
3101
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && wa(c, s) && !wa(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Pa(u, c, l, r.options)), wa(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
3062
3102
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
3063
3103
|
}, t), n.thisAnimationDuration = t);
|
|
3064
3104
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -3068,26 +3108,26 @@ function ka() {
|
|
|
3068
3108
|
animate: function(e, t, n, r) {
|
|
3069
3109
|
if (r) {
|
|
3070
3110
|
G(e, "transition", ""), G(e, "transform", "");
|
|
3071
|
-
var i =
|
|
3072
|
-
e.animatingX = !!s, e.animatingY = !!c, G(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
3111
|
+
var i = pa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3112
|
+
e.animatingX = !!s, e.animatingY = !!c, G(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Na(e), G(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), G(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
3073
3113
|
G(e, "transition", ""), G(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
3074
3114
|
}, r);
|
|
3075
3115
|
}
|
|
3076
3116
|
}
|
|
3077
3117
|
};
|
|
3078
3118
|
}
|
|
3079
|
-
function
|
|
3119
|
+
function Na(e) {
|
|
3080
3120
|
return e.offsetWidth;
|
|
3081
3121
|
}
|
|
3082
|
-
function
|
|
3122
|
+
function Pa(e, t, n, r) {
|
|
3083
3123
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
3084
3124
|
}
|
|
3085
|
-
var
|
|
3125
|
+
var Fa = [], Ia = { initializeByDefault: !0 }, La = {
|
|
3086
3126
|
mount: function(e) {
|
|
3087
|
-
for (var t in
|
|
3088
|
-
|
|
3127
|
+
for (var t in Ia) Ia.hasOwnProperty(t) && !(t in e) && (e[t] = Ia[t]);
|
|
3128
|
+
Fa.forEach(function(t) {
|
|
3089
3129
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
3090
|
-
}),
|
|
3130
|
+
}), Fa.push(e);
|
|
3091
3131
|
},
|
|
3092
3132
|
pluginEvent: function(e, t, n) {
|
|
3093
3133
|
var r = this;
|
|
@@ -3095,16 +3135,16 @@ var Ma = [], Na = { initializeByDefault: !0 }, Pa = {
|
|
|
3095
3135
|
r.eventCanceled = !0;
|
|
3096
3136
|
};
|
|
3097
3137
|
var i = e + "Global";
|
|
3098
|
-
|
|
3099
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3138
|
+
Fa.forEach(function(r) {
|
|
3139
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](qi({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](qi({ sortable: t }, n)));
|
|
3100
3140
|
});
|
|
3101
3141
|
},
|
|
3102
3142
|
initializePlugins: function(e, t, n, r) {
|
|
3103
|
-
for (var i in
|
|
3143
|
+
for (var i in Fa.forEach(function(r) {
|
|
3104
3144
|
var i = r.pluginName;
|
|
3105
3145
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
3106
3146
|
var a = new r(e, t, e.options);
|
|
3107
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3147
|
+
a.sortable = e, a.options = e.options, e[i] = a, Xi(n, a.defaults);
|
|
3108
3148
|
}
|
|
3109
3149
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3110
3150
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3113,59 +3153,59 @@ var Ma = [], Na = { initializeByDefault: !0 }, Pa = {
|
|
|
3113
3153
|
},
|
|
3114
3154
|
getEventProperties: function(e, t) {
|
|
3115
3155
|
var n = {};
|
|
3116
|
-
return
|
|
3117
|
-
typeof r.eventProperties == "function" &&
|
|
3156
|
+
return Fa.forEach(function(r) {
|
|
3157
|
+
typeof r.eventProperties == "function" && Xi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3118
3158
|
}), n;
|
|
3119
3159
|
},
|
|
3120
3160
|
modifyOption: function(e, t, n) {
|
|
3121
3161
|
var r;
|
|
3122
|
-
return
|
|
3162
|
+
return Fa.forEach(function(i) {
|
|
3123
3163
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
3124
3164
|
}), r;
|
|
3125
3165
|
}
|
|
3126
3166
|
};
|
|
3127
|
-
function
|
|
3167
|
+
function Ra(e) {
|
|
3128
3168
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
3129
|
-
if (t ||= n && n[
|
|
3169
|
+
if (t ||= n && n[ja], t) {
|
|
3130
3170
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3131
|
-
window.CustomEvent && !
|
|
3171
|
+
window.CustomEvent && !ta && !na ? h = new CustomEvent(r, {
|
|
3132
3172
|
bubbles: !0,
|
|
3133
3173
|
cancelable: !0
|
|
3134
3174
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
3135
|
-
var v =
|
|
3175
|
+
var v = qi(qi({}, m), La.getEventProperties(r, t));
|
|
3136
3176
|
for (var y in v) h[y] = v[y];
|
|
3137
3177
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3138
3178
|
}
|
|
3139
3179
|
}
|
|
3140
|
-
var
|
|
3141
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3142
|
-
|
|
3180
|
+
var za = ["evt"], Ba = function(e, t) {
|
|
3181
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Qi(n, za);
|
|
3182
|
+
La.pluginEvent.bind(Q)(e, t, qi({
|
|
3143
3183
|
dragEl: q,
|
|
3144
3184
|
parentEl: J,
|
|
3145
3185
|
ghostEl: Y,
|
|
3146
3186
|
rootEl: X,
|
|
3147
|
-
nextEl:
|
|
3148
|
-
lastDownEl:
|
|
3187
|
+
nextEl: Ha,
|
|
3188
|
+
lastDownEl: Ua,
|
|
3149
3189
|
cloneEl: Z,
|
|
3150
|
-
cloneHidden:
|
|
3151
|
-
dragStarted:
|
|
3152
|
-
putSortable:
|
|
3190
|
+
cloneHidden: Wa,
|
|
3191
|
+
dragStarted: oo,
|
|
3192
|
+
putSortable: Xa,
|
|
3153
3193
|
activeSortable: Q.active,
|
|
3154
3194
|
originalEvent: r,
|
|
3155
|
-
oldIndex:
|
|
3156
|
-
oldDraggableIndex:
|
|
3157
|
-
newIndex:
|
|
3158
|
-
newDraggableIndex:
|
|
3159
|
-
hideGhostForTarget:
|
|
3160
|
-
unhideGhostForTarget:
|
|
3195
|
+
oldIndex: Ga,
|
|
3196
|
+
oldDraggableIndex: qa,
|
|
3197
|
+
newIndex: Ka,
|
|
3198
|
+
newDraggableIndex: Ja,
|
|
3199
|
+
hideGhostForTarget: Eo,
|
|
3200
|
+
unhideGhostForTarget: Do,
|
|
3161
3201
|
cloneNowHidden: function() {
|
|
3162
|
-
|
|
3202
|
+
Wa = !0;
|
|
3163
3203
|
},
|
|
3164
3204
|
cloneNowShown: function() {
|
|
3165
|
-
|
|
3205
|
+
Wa = !1;
|
|
3166
3206
|
},
|
|
3167
3207
|
dispatchSortableEvent: function(e) {
|
|
3168
|
-
|
|
3208
|
+
Va({
|
|
3169
3209
|
sortable: t,
|
|
3170
3210
|
name: e,
|
|
3171
3211
|
originalEvent: r
|
|
@@ -3173,46 +3213,46 @@ var Ia = ["evt"], La = function(e, t) {
|
|
|
3173
3213
|
}
|
|
3174
3214
|
}, i));
|
|
3175
3215
|
};
|
|
3176
|
-
function
|
|
3177
|
-
|
|
3178
|
-
putSortable:
|
|
3216
|
+
function Va(e) {
|
|
3217
|
+
Ra(qi({
|
|
3218
|
+
putSortable: Xa,
|
|
3179
3219
|
cloneEl: Z,
|
|
3180
3220
|
targetEl: q,
|
|
3181
3221
|
rootEl: X,
|
|
3182
|
-
oldIndex:
|
|
3183
|
-
oldDraggableIndex:
|
|
3184
|
-
newIndex:
|
|
3185
|
-
newDraggableIndex:
|
|
3222
|
+
oldIndex: Ga,
|
|
3223
|
+
oldDraggableIndex: qa,
|
|
3224
|
+
newIndex: Ka,
|
|
3225
|
+
newDraggableIndex: Ja
|
|
3186
3226
|
}, e));
|
|
3187
3227
|
}
|
|
3188
|
-
var q, J, Y, X,
|
|
3189
|
-
if (
|
|
3190
|
-
if (
|
|
3228
|
+
var q, J, Y, X, Ha, Ua, Z, Wa, Ga, Ka, qa, Ja, Ya, Xa, Za = !1, Qa = !1, $a = [], eo, to, no, ro, io, ao, oo, so, co, lo = !1, uo = !1, fo, po, mo = [], ho = !1, go = [], _o = typeof document < "u", vo = aa, yo = na || ta ? "cssFloat" : "float", bo = _o && !oa && !aa && "draggable" in document.createElement("div"), xo = function() {
|
|
3229
|
+
if (_o) {
|
|
3230
|
+
if (ta) return !1;
|
|
3191
3231
|
var e = document.createElement("x");
|
|
3192
3232
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3193
3233
|
}
|
|
3194
|
-
}(),
|
|
3195
|
-
var n = G(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3234
|
+
}(), So = function(e, t) {
|
|
3235
|
+
var n = G(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = _a(e, 0, t), a = _a(e, 1, t), o = i && G(i), s = a && G(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + K(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + K(a).width;
|
|
3196
3236
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3197
3237
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3198
3238
|
if (i && o.float && o.float !== "none") {
|
|
3199
3239
|
var u = o.float === "left" ? "left" : "right";
|
|
3200
3240
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3201
3241
|
}
|
|
3202
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3203
|
-
},
|
|
3242
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[yo] === "none" || a && n[yo] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3243
|
+
}, Co = function(e, t, n) {
|
|
3204
3244
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
3205
3245
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3206
|
-
},
|
|
3246
|
+
}, wo = function(e, t) {
|
|
3207
3247
|
var n;
|
|
3208
|
-
return
|
|
3209
|
-
var i = r[
|
|
3210
|
-
if (!(!i ||
|
|
3248
|
+
return $a.some(function(r) {
|
|
3249
|
+
var i = r[ja].options.emptyInsertThreshold;
|
|
3250
|
+
if (!(!i || va(r))) {
|
|
3211
3251
|
var a = K(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3212
3252
|
if (o && s) return n = r;
|
|
3213
3253
|
}
|
|
3214
3254
|
}), n;
|
|
3215
|
-
},
|
|
3255
|
+
}, To = function(e) {
|
|
3216
3256
|
function t(e, n) {
|
|
3217
3257
|
return function(r, i, a, o) {
|
|
3218
3258
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3225,31 +3265,31 @@ var q, J, Y, X, za, Ba, Z, Va, Ha, Ua, Wa, Ga, Ka, qa, Ja = !1, Ya = !1, Xa = []
|
|
|
3225
3265
|
};
|
|
3226
3266
|
}
|
|
3227
3267
|
var n = {}, r = e.group;
|
|
3228
|
-
(!r ||
|
|
3229
|
-
},
|
|
3230
|
-
!
|
|
3231
|
-
},
|
|
3232
|
-
!
|
|
3268
|
+
(!r || Ji(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
3269
|
+
}, Eo = function() {
|
|
3270
|
+
!xo && Y && G(Y, "display", "none");
|
|
3271
|
+
}, Do = function() {
|
|
3272
|
+
!xo && Y && G(Y, "display", "");
|
|
3233
3273
|
};
|
|
3234
|
-
|
|
3235
|
-
if (
|
|
3274
|
+
_o && !oa && document.addEventListener("click", function(e) {
|
|
3275
|
+
if (Qa) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Qa = !1, !1;
|
|
3236
3276
|
}, !0);
|
|
3237
|
-
var
|
|
3277
|
+
var Oo = function(e) {
|
|
3238
3278
|
if (q) {
|
|
3239
3279
|
e = e.touches ? e.touches[0] : e;
|
|
3240
|
-
var t =
|
|
3280
|
+
var t = wo(e.clientX, e.clientY);
|
|
3241
3281
|
if (t) {
|
|
3242
3282
|
var n = {};
|
|
3243
3283
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3244
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3284
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ja]._onDragOver(n);
|
|
3245
3285
|
}
|
|
3246
3286
|
}
|
|
3247
|
-
},
|
|
3248
|
-
q && q.parentNode[
|
|
3287
|
+
}, ko = function(e) {
|
|
3288
|
+
q && q.parentNode[ja]._isOutsideThisEl(e.target);
|
|
3249
3289
|
};
|
|
3250
3290
|
function Q(e, t) {
|
|
3251
3291
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3252
|
-
this.el = e, this.options = t =
|
|
3292
|
+
this.el = e, this.options = t = Xi({}, t), e[ja] = this;
|
|
3253
3293
|
var n = {
|
|
3254
3294
|
group: null,
|
|
3255
3295
|
sort: !0,
|
|
@@ -3262,7 +3302,7 @@ function Q(e, t) {
|
|
|
3262
3302
|
invertedSwapThreshold: null,
|
|
3263
3303
|
removeCloneOnHide: !0,
|
|
3264
3304
|
direction: function() {
|
|
3265
|
-
return
|
|
3305
|
+
return So(e, this.options);
|
|
3266
3306
|
},
|
|
3267
3307
|
ghostClass: "sortable-ghost",
|
|
3268
3308
|
chosenClass: "sortable-chosen",
|
|
@@ -3289,17 +3329,17 @@ function Q(e, t) {
|
|
|
3289
3329
|
x: 0,
|
|
3290
3330
|
y: 0
|
|
3291
3331
|
},
|
|
3292
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3332
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ia,
|
|
3293
3333
|
emptyInsertThreshold: 5
|
|
3294
3334
|
};
|
|
3295
|
-
for (var r in
|
|
3296
|
-
for (var i in
|
|
3297
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3335
|
+
for (var r in La.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3336
|
+
for (var i in To(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3337
|
+
this.nativeDraggable = !t.forceFallback && bo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? U(e, "pointerdown", this._onTapStart) : (U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart)), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), $a.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Xi(this, Ma());
|
|
3298
3338
|
}
|
|
3299
3339
|
Q.prototype = {
|
|
3300
3340
|
constructor: Q,
|
|
3301
3341
|
_isOutsideThisEl: function(e) {
|
|
3302
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3342
|
+
!this.el.contains(e) && e !== this.el && (so = null);
|
|
3303
3343
|
},
|
|
3304
3344
|
_getDirection: function(e, t) {
|
|
3305
3345
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, q) : this.options.direction;
|
|
@@ -3307,33 +3347,33 @@ Q.prototype = {
|
|
|
3307
3347
|
_onTapStart: function(e) {
|
|
3308
3348
|
if (e.cancelable) {
|
|
3309
3349
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
3310
|
-
if (
|
|
3311
|
-
if (
|
|
3350
|
+
if (zo(n), !q && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ia && s && s.tagName.toUpperCase() === "SELECT") && (s = ua(s, r.draggable, n, !1), !(s && s.animated) && Ua !== s)) {
|
|
3351
|
+
if (Ga = ya(s), qa = ya(s, r.draggable), typeof l == "function") {
|
|
3312
3352
|
if (l.call(this, e, s, this)) {
|
|
3313
|
-
|
|
3353
|
+
Va({
|
|
3314
3354
|
sortable: t,
|
|
3315
3355
|
rootEl: c,
|
|
3316
3356
|
name: "filter",
|
|
3317
3357
|
targetEl: s,
|
|
3318
3358
|
toEl: n,
|
|
3319
3359
|
fromEl: n
|
|
3320
|
-
}),
|
|
3360
|
+
}), Ba("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3321
3361
|
return;
|
|
3322
3362
|
}
|
|
3323
3363
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3324
|
-
if (r =
|
|
3364
|
+
if (r = ua(c, r.trim(), n, !1), r) return Va({
|
|
3325
3365
|
sortable: t,
|
|
3326
3366
|
rootEl: r,
|
|
3327
3367
|
name: "filter",
|
|
3328
3368
|
targetEl: s,
|
|
3329
3369
|
fromEl: n,
|
|
3330
3370
|
toEl: n
|
|
3331
|
-
}),
|
|
3371
|
+
}), Ba("filter", t, { evt: e }), !0;
|
|
3332
3372
|
}), l)) {
|
|
3333
3373
|
i && e.cancelable && e.preventDefault();
|
|
3334
3374
|
return;
|
|
3335
3375
|
}
|
|
3336
|
-
r.handle && !
|
|
3376
|
+
r.handle && !ua(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3337
3377
|
}
|
|
3338
3378
|
}
|
|
3339
3379
|
},
|
|
@@ -3341,23 +3381,23 @@ Q.prototype = {
|
|
|
3341
3381
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3342
3382
|
if (n && !q && n.parentNode === i) {
|
|
3343
3383
|
var c = K(n);
|
|
3344
|
-
if (X = i, q = n, J = q.parentNode,
|
|
3384
|
+
if (X = i, q = n, J = q.parentNode, Ha = q.nextSibling, Ua = n, Ya = a.group, Q.dragged = q, eo = {
|
|
3345
3385
|
target: q,
|
|
3346
3386
|
clientX: (t || e).clientX,
|
|
3347
3387
|
clientY: (t || e).clientY
|
|
3348
|
-
},
|
|
3349
|
-
if (
|
|
3388
|
+
}, io = eo.clientX - c.left, ao = eo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, q.style["will-change"] = "all", s = function() {
|
|
3389
|
+
if (Ba("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3350
3390
|
r._onDrop();
|
|
3351
3391
|
return;
|
|
3352
3392
|
}
|
|
3353
|
-
r._disableDelayedDragEvents(), !
|
|
3393
|
+
r._disableDelayedDragEvents(), !ra && r.nativeDraggable && (q.draggable = !0), r._triggerDragStart(e, t), Va({
|
|
3354
3394
|
sortable: r,
|
|
3355
3395
|
name: "choose",
|
|
3356
3396
|
originalEvent: e
|
|
3357
|
-
}),
|
|
3397
|
+
}), fa(q, a.chosenClass, !0);
|
|
3358
3398
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3359
|
-
|
|
3360
|
-
}), U(o, "dragover",
|
|
3399
|
+
ma(q, e.trim(), Mo);
|
|
3400
|
+
}), U(o, "dragover", Oo), U(o, "mousemove", Oo), U(o, "touchmove", Oo), U(o, "mouseup", r._onDrop), U(o, "touchend", r._onDrop), U(o, "touchcancel", r._onDrop), ra && this.nativeDraggable && (this.options.touchStartThreshold = 4, q.draggable = !0), Ba("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(na || ta))) {
|
|
3361
3401
|
if (Q.eventCanceled) {
|
|
3362
3402
|
this._onDrop();
|
|
3363
3403
|
return;
|
|
@@ -3371,7 +3411,7 @@ Q.prototype = {
|
|
|
3371
3411
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3372
3412
|
},
|
|
3373
3413
|
_disableDelayedDrag: function() {
|
|
3374
|
-
q &&
|
|
3414
|
+
q && Mo(q), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3375
3415
|
},
|
|
3376
3416
|
_disableDelayedDragEvents: function() {
|
|
3377
3417
|
var e = this.el.ownerDocument;
|
|
@@ -3380,16 +3420,16 @@ Q.prototype = {
|
|
|
3380
3420
|
_triggerDragStart: function(e, t) {
|
|
3381
3421
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? U(document, "pointermove", this._onTouchMove) : t ? U(document, "touchmove", this._onTouchMove) : U(document, "mousemove", this._onTouchMove) : (U(q, "dragend", this), U(X, "dragstart", this._onDragStart));
|
|
3382
3422
|
try {
|
|
3383
|
-
document.selection ?
|
|
3423
|
+
document.selection ? Bo(function() {
|
|
3384
3424
|
document.selection.empty();
|
|
3385
3425
|
}) : window.getSelection().removeAllRanges();
|
|
3386
3426
|
} catch {}
|
|
3387
3427
|
},
|
|
3388
3428
|
_dragStarted: function(e, t) {
|
|
3389
|
-
if (
|
|
3390
|
-
|
|
3429
|
+
if (Za = !1, X && q) {
|
|
3430
|
+
Ba("dragStarted", this, { evt: t }), this.nativeDraggable && U(document, "dragover", ko);
|
|
3391
3431
|
var n = this.options;
|
|
3392
|
-
!e &&
|
|
3432
|
+
!e && fa(q, n.dragClass, !1), fa(q, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), Va({
|
|
3393
3433
|
sortable: this,
|
|
3394
3434
|
name: "start",
|
|
3395
3435
|
originalEvent: t
|
|
@@ -3397,33 +3437,33 @@ Q.prototype = {
|
|
|
3397
3437
|
} else this._nulling();
|
|
3398
3438
|
},
|
|
3399
3439
|
_emulateDragOver: function() {
|
|
3400
|
-
if (
|
|
3401
|
-
this._lastX =
|
|
3402
|
-
for (var e = document.elementFromPoint(
|
|
3403
|
-
if (q.parentNode[
|
|
3404
|
-
if (t[
|
|
3440
|
+
if (to) {
|
|
3441
|
+
this._lastX = to.clientX, this._lastY = to.clientY, Eo();
|
|
3442
|
+
for (var e = document.elementFromPoint(to.clientX, to.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(to.clientX, to.clientY), e !== t);) t = e;
|
|
3443
|
+
if (q.parentNode[ja]._isOutsideThisEl(e), t) do {
|
|
3444
|
+
if (t[ja]) {
|
|
3405
3445
|
var n = void 0;
|
|
3406
|
-
if (n = t[
|
|
3407
|
-
clientX:
|
|
3408
|
-
clientY:
|
|
3446
|
+
if (n = t[ja]._onDragOver({
|
|
3447
|
+
clientX: to.clientX,
|
|
3448
|
+
clientY: to.clientY,
|
|
3409
3449
|
target: e,
|
|
3410
3450
|
rootEl: t
|
|
3411
3451
|
}), n && !this.options.dragoverBubble) break;
|
|
3412
3452
|
}
|
|
3413
3453
|
e = t;
|
|
3414
3454
|
} while (t = t.parentNode);
|
|
3415
|
-
|
|
3455
|
+
Do();
|
|
3416
3456
|
}
|
|
3417
3457
|
},
|
|
3418
3458
|
_onTouchMove: function(e) {
|
|
3419
|
-
if (
|
|
3420
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = Y &&
|
|
3421
|
-
if (!Q.active && !
|
|
3459
|
+
if (eo) {
|
|
3460
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = Y && pa(Y, !0), o = Y && a && a.a, s = Y && a && a.d, c = vo && po && ba(po), l = (i.clientX - eo.clientX + r.x) / (o || 1) + (c ? c[0] - mo[0] : 0) / (o || 1), u = (i.clientY - eo.clientY + r.y) / (s || 1) + (c ? c[1] - mo[1] : 0) / (s || 1);
|
|
3461
|
+
if (!Q.active && !Za) {
|
|
3422
3462
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3423
3463
|
this._onDragStart(e, !0);
|
|
3424
3464
|
}
|
|
3425
3465
|
if (Y) {
|
|
3426
|
-
a ? (a.e += l - (
|
|
3466
|
+
a ? (a.e += l - (no || 0), a.f += u - (ro || 0)) : a = {
|
|
3427
3467
|
a: 1,
|
|
3428
3468
|
b: 0,
|
|
3429
3469
|
c: 0,
|
|
@@ -3432,39 +3472,39 @@ Q.prototype = {
|
|
|
3432
3472
|
f: u
|
|
3433
3473
|
};
|
|
3434
3474
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3435
|
-
G(Y, "webkitTransform", d), G(Y, "mozTransform", d), G(Y, "msTransform", d), G(Y, "transform", d),
|
|
3475
|
+
G(Y, "webkitTransform", d), G(Y, "mozTransform", d), G(Y, "msTransform", d), G(Y, "transform", d), no = l, ro = u, to = i;
|
|
3436
3476
|
}
|
|
3437
3477
|
e.cancelable && e.preventDefault();
|
|
3438
3478
|
}
|
|
3439
3479
|
},
|
|
3440
3480
|
_appendGhost: function() {
|
|
3441
3481
|
if (!Y) {
|
|
3442
|
-
var e = this.options.fallbackOnBody ? document.body : X, t = K(q, !0,
|
|
3443
|
-
if (
|
|
3444
|
-
for (
|
|
3445
|
-
|
|
3482
|
+
var e = this.options.fallbackOnBody ? document.body : X, t = K(q, !0, vo, !0, e), n = this.options;
|
|
3483
|
+
if (vo) {
|
|
3484
|
+
for (po = e; G(po, "position") === "static" && G(po, "transform") === "none" && po !== document;) po = po.parentNode;
|
|
3485
|
+
po !== document.body && po !== document.documentElement ? (po === document && (po = ha()), t.top += po.scrollTop, t.left += po.scrollLeft) : po = ha(), mo = ba(po);
|
|
3446
3486
|
}
|
|
3447
|
-
Y = q.cloneNode(!0),
|
|
3487
|
+
Y = q.cloneNode(!0), fa(Y, n.ghostClass, !1), fa(Y, n.fallbackClass, !0), fa(Y, n.dragClass, !0), G(Y, "transition", ""), G(Y, "transform", ""), G(Y, "box-sizing", "border-box"), G(Y, "margin", 0), G(Y, "top", t.top), G(Y, "left", t.left), G(Y, "width", t.width), G(Y, "height", t.height), G(Y, "opacity", "0.8"), G(Y, "position", vo ? "absolute" : "fixed"), G(Y, "zIndex", "100000"), G(Y, "pointerEvents", "none"), Q.ghost = Y, e.appendChild(Y), G(Y, "transform-origin", io / parseInt(Y.style.width) * 100 + "% " + ao / parseInt(Y.style.height) * 100 + "%");
|
|
3448
3488
|
}
|
|
3449
3489
|
},
|
|
3450
3490
|
_onDragStart: function(e, t) {
|
|
3451
3491
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3452
|
-
if (
|
|
3492
|
+
if (Ba("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3453
3493
|
this._onDrop();
|
|
3454
3494
|
return;
|
|
3455
3495
|
}
|
|
3456
|
-
|
|
3457
|
-
|
|
3496
|
+
Ba("setupClone", this), Q.eventCanceled || (Z = ka(q), Z.removeAttribute("id"), Z.draggable = !1, Z.style["will-change"] = "", this._hideClone(), fa(Z, this.options.chosenClass, !1), Q.clone = Z), n.cloneId = Bo(function() {
|
|
3497
|
+
Ba("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || X.insertBefore(Z, q), n._hideClone(), Va({
|
|
3458
3498
|
sortable: n,
|
|
3459
3499
|
name: "clone"
|
|
3460
3500
|
}));
|
|
3461
|
-
}), !t &&
|
|
3501
|
+
}), !t && fa(q, i.dragClass, !0), t ? (Qa = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (W(document, "mouseup", n._onDrop), W(document, "touchend", n._onDrop), W(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, q)), U(document, "drop", n), G(q, "transform", "translateZ(0)")), Za = !0, n._dragStartId = Bo(n._dragStarted.bind(n, t, e)), U(document, "selectstart", n), oo = !0, ia && G(document.body, "user-select", "none");
|
|
3462
3502
|
},
|
|
3463
3503
|
_onDragOver: function(e) {
|
|
3464
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3465
|
-
if (
|
|
3504
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Ya === s, u = o.sort, d = Xa || c, f, p = this, m = !1;
|
|
3505
|
+
if (ho) return;
|
|
3466
3506
|
function h(o, s) {
|
|
3467
|
-
|
|
3507
|
+
Ba(o, p, qi({
|
|
3468
3508
|
evt: e,
|
|
3469
3509
|
isOwner: l,
|
|
3470
3510
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3476,7 +3516,7 @@ Q.prototype = {
|
|
|
3476
3516
|
target: n,
|
|
3477
3517
|
completed: _,
|
|
3478
3518
|
onMove: function(n, i) {
|
|
3479
|
-
return
|
|
3519
|
+
return jo(X, t, q, r, n, K(n), e, i);
|
|
3480
3520
|
},
|
|
3481
3521
|
changed: v
|
|
3482
3522
|
}, s));
|
|
@@ -3485,50 +3525,50 @@ Q.prototype = {
|
|
|
3485
3525
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3486
3526
|
}
|
|
3487
3527
|
function _(r) {
|
|
3488
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3528
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (fa(q, Xa ? Xa.options.ghostClass : c.options.ghostClass, !1), fa(q, o.ghostClass, !0)), Xa !== p && p !== Q.active ? Xa = p : p === Q.active && Xa && (Xa = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3489
3529
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3490
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === q && !q.animated || n === t && !n.animated) && (
|
|
3530
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === q && !q.animated || n === t && !n.animated) && (so = null), !o.dragoverBubble && !e.rootEl && n !== document && (q.parentNode[ja]._isOutsideThisEl(e.target), !r && Oo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3491
3531
|
}
|
|
3492
3532
|
function v() {
|
|
3493
|
-
|
|
3533
|
+
Ka = ya(q), Ja = ya(q, o.draggable), Va({
|
|
3494
3534
|
sortable: p,
|
|
3495
3535
|
name: "change",
|
|
3496
3536
|
toEl: t,
|
|
3497
|
-
newIndex:
|
|
3498
|
-
newDraggableIndex:
|
|
3537
|
+
newIndex: Ka,
|
|
3538
|
+
newDraggableIndex: Ja,
|
|
3499
3539
|
originalEvent: e
|
|
3500
3540
|
});
|
|
3501
3541
|
}
|
|
3502
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3542
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = ua(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3503
3543
|
if (q.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3504
|
-
if (
|
|
3544
|
+
if (Qa = !1, c && !o.disabled && (l ? u || (a = J !== X) : Xa === this || (this.lastPutMode = Ya.checkPull(this, c, q, e)) && s.checkPut(this, c, q, e))) {
|
|
3505
3545
|
if (f = this._getDirection(e, n) === "vertical", r = K(q), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3506
|
-
if (a) return J = X, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3507
|
-
var y =
|
|
3508
|
-
if (!y ||
|
|
3546
|
+
if (a) return J = X, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ha ? X.insertBefore(q, Ha) : X.appendChild(q)), _(!0);
|
|
3547
|
+
var y = va(t, o.draggable);
|
|
3548
|
+
if (!y || Fo(e, f, this) && !y.animated) {
|
|
3509
3549
|
if (y === q) return _(!1);
|
|
3510
|
-
if (y && t === e.target && (n = y), n && (i = K(n)),
|
|
3511
|
-
} else if (y &&
|
|
3512
|
-
var b =
|
|
3550
|
+
if (y && t === e.target && (n = y), n && (i = K(n)), jo(X, t, q, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(q, y.nextSibling) : t.appendChild(q), J = t, v(), _(!0);
|
|
3551
|
+
} else if (y && Po(e, f, this)) {
|
|
3552
|
+
var b = _a(t, 0, o, !0);
|
|
3513
3553
|
if (b === q) return _(!1);
|
|
3514
|
-
if (n = b, i = K(n),
|
|
3554
|
+
if (n = b, i = K(n), jo(X, t, q, r, n, i, e, !1) !== !1) return g(), t.insertBefore(q, b), J = t, v(), _(!0);
|
|
3515
3555
|
} else if (n.parentNode === t) {
|
|
3516
3556
|
i = K(n);
|
|
3517
|
-
var x = 0, ee, te = q.parentNode !== t,
|
|
3518
|
-
|
|
3519
|
-
var
|
|
3557
|
+
var x = 0, ee, te = q.parentNode !== t, S = !Co(q.animated && q.toRect || r, n.animated && n.toRect || i, f), C = f ? "top" : "left", ne = ga(n, "top", "top") || ga(q, "top", "top"), re = ne ? ne.scrollTop : void 0;
|
|
3558
|
+
so !== n && (ee = i[C], lo = !1, uo = !S && o.invertSwap || te), x = Io(e, n, i, f, S ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, uo, so === n);
|
|
3559
|
+
var ie;
|
|
3520
3560
|
if (x !== 0) {
|
|
3521
|
-
var
|
|
3561
|
+
var ae = ya(q);
|
|
3522
3562
|
do
|
|
3523
|
-
|
|
3524
|
-
while (
|
|
3563
|
+
ae -= x, ie = J.children[ae];
|
|
3564
|
+
while (ie && (G(ie, "display") === "none" || ie === Y));
|
|
3525
3565
|
}
|
|
3526
|
-
if (x === 0 ||
|
|
3527
|
-
|
|
3528
|
-
var
|
|
3566
|
+
if (x === 0 || ie === n) return _(!1);
|
|
3567
|
+
so = n, co = x;
|
|
3568
|
+
var oe = n.nextElementSibling, se = !1;
|
|
3529
3569
|
se = x === 1;
|
|
3530
|
-
var ce =
|
|
3531
|
-
if (ce !== !1) return (ce === 1 || ce === -1) && (se = ce === 1),
|
|
3570
|
+
var ce = jo(X, t, q, r, n, i, e, se);
|
|
3571
|
+
if (ce !== !1) return (ce === 1 || ce === -1) && (se = ce === 1), ho = !0, setTimeout(No, 30), g(), se && !oe ? t.appendChild(q) : n.parentNode.insertBefore(q, se ? oe : n), ne && Oa(ne, 0, re - ne.scrollTop), J = q.parentNode, ee !== void 0 && !uo && (fo = Math.abs(ee - K(n)[C])), v(), _(!0);
|
|
3532
3572
|
}
|
|
3533
3573
|
if (t.contains(q)) return _(!1);
|
|
3534
3574
|
}
|
|
@@ -3536,7 +3576,7 @@ Q.prototype = {
|
|
|
3536
3576
|
},
|
|
3537
3577
|
_ignoreWhileAnimating: null,
|
|
3538
3578
|
_offMoveEvents: function() {
|
|
3539
|
-
W(document, "mousemove", this._onTouchMove), W(document, "touchmove", this._onTouchMove), W(document, "pointermove", this._onTouchMove), W(document, "dragover",
|
|
3579
|
+
W(document, "mousemove", this._onTouchMove), W(document, "touchmove", this._onTouchMove), W(document, "pointermove", this._onTouchMove), W(document, "dragover", Oo), W(document, "mousemove", Oo), W(document, "touchmove", Oo);
|
|
3540
3580
|
},
|
|
3541
3581
|
_offUpEvents: function() {
|
|
3542
3582
|
var e = this.el.ownerDocument;
|
|
@@ -3544,50 +3584,50 @@ Q.prototype = {
|
|
|
3544
3584
|
},
|
|
3545
3585
|
_onDrop: function(e) {
|
|
3546
3586
|
var t = this.el, n = this.options;
|
|
3547
|
-
if (
|
|
3587
|
+
if (Ka = ya(q), Ja = ya(q, n.draggable), Ba("drop", this, { evt: e }), J = q && q.parentNode, Ka = ya(q), Ja = ya(q, n.draggable), Q.eventCanceled) {
|
|
3548
3588
|
this._nulling();
|
|
3549
3589
|
return;
|
|
3550
3590
|
}
|
|
3551
|
-
|
|
3591
|
+
Za = !1, uo = !1, lo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Vo(this.cloneId), Vo(this._dragStartId), this.nativeDraggable && (W(document, "drop", this), W(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ia && G(document.body, "user-select", ""), G(q, "transform", ""), e && (oo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), Y && Y.parentNode && Y.parentNode.removeChild(Y), (X === J || Xa && Xa.lastPutMode !== "clone") && Z && Z.parentNode && Z.parentNode.removeChild(Z), q && (this.nativeDraggable && W(q, "dragend", this), Mo(q), q.style["will-change"] = "", oo && !Za && fa(q, Xa ? Xa.options.ghostClass : this.options.ghostClass, !1), fa(q, this.options.chosenClass, !1), Va({
|
|
3552
3592
|
sortable: this,
|
|
3553
3593
|
name: "unchoose",
|
|
3554
3594
|
toEl: J,
|
|
3555
3595
|
newIndex: null,
|
|
3556
3596
|
newDraggableIndex: null,
|
|
3557
3597
|
originalEvent: e
|
|
3558
|
-
}), X === J ?
|
|
3598
|
+
}), X === J ? Ka !== Ga && Ka >= 0 && (Va({
|
|
3559
3599
|
sortable: this,
|
|
3560
3600
|
name: "update",
|
|
3561
3601
|
toEl: J,
|
|
3562
3602
|
originalEvent: e
|
|
3563
|
-
}),
|
|
3603
|
+
}), Va({
|
|
3564
3604
|
sortable: this,
|
|
3565
3605
|
name: "sort",
|
|
3566
3606
|
toEl: J,
|
|
3567
3607
|
originalEvent: e
|
|
3568
|
-
})) : (
|
|
3608
|
+
})) : (Ka >= 0 && (Va({
|
|
3569
3609
|
rootEl: J,
|
|
3570
3610
|
name: "add",
|
|
3571
3611
|
toEl: J,
|
|
3572
3612
|
fromEl: X,
|
|
3573
3613
|
originalEvent: e
|
|
3574
|
-
}),
|
|
3614
|
+
}), Va({
|
|
3575
3615
|
sortable: this,
|
|
3576
3616
|
name: "remove",
|
|
3577
3617
|
toEl: J,
|
|
3578
3618
|
originalEvent: e
|
|
3579
|
-
}),
|
|
3619
|
+
}), Va({
|
|
3580
3620
|
rootEl: J,
|
|
3581
3621
|
name: "sort",
|
|
3582
3622
|
toEl: J,
|
|
3583
3623
|
fromEl: X,
|
|
3584
3624
|
originalEvent: e
|
|
3585
|
-
}),
|
|
3625
|
+
}), Va({
|
|
3586
3626
|
sortable: this,
|
|
3587
3627
|
name: "sort",
|
|
3588
3628
|
toEl: J,
|
|
3589
3629
|
originalEvent: e
|
|
3590
|
-
})),
|
|
3630
|
+
})), Xa && Xa.save()), Q.active && ((Ka == null || Ka === -1) && (Ka = Ga, Ja = qa), Va({
|
|
3591
3631
|
sortable: this,
|
|
3592
3632
|
name: "end",
|
|
3593
3633
|
toEl: J,
|
|
@@ -3595,9 +3635,9 @@ Q.prototype = {
|
|
|
3595
3635
|
}), this.save()))), this._nulling();
|
|
3596
3636
|
},
|
|
3597
3637
|
_nulling: function() {
|
|
3598
|
-
|
|
3638
|
+
Ba("nulling", this), X = q = J = Y = Ha = Z = Ua = Wa = eo = to = oo = Ka = Ja = Ga = qa = so = co = Xa = Ya = Q.dragged = Q.ghost = Q.clone = Q.active = null, go.forEach(function(e) {
|
|
3599
3639
|
e.checked = !0;
|
|
3600
|
-
}),
|
|
3640
|
+
}), go.length = no = ro = 0;
|
|
3601
3641
|
},
|
|
3602
3642
|
handleEvent: function(e) {
|
|
3603
3643
|
switch (e.type) {
|
|
@@ -3607,20 +3647,20 @@ Q.prototype = {
|
|
|
3607
3647
|
break;
|
|
3608
3648
|
case "dragenter":
|
|
3609
3649
|
case "dragover":
|
|
3610
|
-
q && (this._onDragOver(e),
|
|
3650
|
+
q && (this._onDragOver(e), Ao(e));
|
|
3611
3651
|
break;
|
|
3612
3652
|
case "selectstart": e.preventDefault();
|
|
3613
3653
|
}
|
|
3614
3654
|
},
|
|
3615
3655
|
toArray: function() {
|
|
3616
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3656
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], ua(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ro(t));
|
|
3617
3657
|
return e;
|
|
3618
3658
|
},
|
|
3619
3659
|
sort: function(e, t) {
|
|
3620
3660
|
var n = {}, r = this.el;
|
|
3621
3661
|
this.toArray().forEach(function(e, t) {
|
|
3622
3662
|
var i = r.children[t];
|
|
3623
|
-
|
|
3663
|
+
ua(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3624
3664
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3625
3665
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3626
3666
|
}), t && this.animateAll();
|
|
@@ -3630,25 +3670,25 @@ Q.prototype = {
|
|
|
3630
3670
|
e && e.set && e.set(this);
|
|
3631
3671
|
},
|
|
3632
3672
|
closest: function(e, t) {
|
|
3633
|
-
return
|
|
3673
|
+
return ua(e, t || this.options.draggable, this.el, !1);
|
|
3634
3674
|
},
|
|
3635
3675
|
option: function(e, t) {
|
|
3636
3676
|
var n = this.options;
|
|
3637
3677
|
if (t === void 0) return n[e];
|
|
3638
|
-
var r =
|
|
3639
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3678
|
+
var r = La.modifyOption(this, e, t);
|
|
3679
|
+
n[e] = r === void 0 ? t : r, e === "group" && To(n);
|
|
3640
3680
|
},
|
|
3641
3681
|
destroy: function() {
|
|
3642
|
-
|
|
3682
|
+
Ba("destroy", this);
|
|
3643
3683
|
var e = this.el;
|
|
3644
|
-
e[
|
|
3684
|
+
e[ja] = null, W(e, "mousedown", this._onTapStart), W(e, "touchstart", this._onTapStart), W(e, "pointerdown", this._onTapStart), this.nativeDraggable && (W(e, "dragover", this), W(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3645
3685
|
e.removeAttribute("draggable");
|
|
3646
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3686
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), $a.splice($a.indexOf(this.el), 1), this.el = e = null;
|
|
3647
3687
|
},
|
|
3648
3688
|
_hideClone: function() {
|
|
3649
|
-
if (!
|
|
3650
|
-
if (
|
|
3651
|
-
G(Z, "display", "none"), this.options.removeCloneOnHide && Z.parentNode && Z.parentNode.removeChild(Z),
|
|
3689
|
+
if (!Wa) {
|
|
3690
|
+
if (Ba("hideClone", this), Q.eventCanceled) return;
|
|
3691
|
+
G(Z, "display", "none"), this.options.removeCloneOnHide && Z.parentNode && Z.parentNode.removeChild(Z), Wa = !0;
|
|
3652
3692
|
}
|
|
3653
3693
|
},
|
|
3654
3694
|
_showClone: function(e) {
|
|
@@ -3656,99 +3696,99 @@ Q.prototype = {
|
|
|
3656
3696
|
this._hideClone();
|
|
3657
3697
|
return;
|
|
3658
3698
|
}
|
|
3659
|
-
if (
|
|
3660
|
-
if (
|
|
3661
|
-
q.parentNode == X && !this.options.group.revertClone ? X.insertBefore(Z, q) :
|
|
3699
|
+
if (Wa) {
|
|
3700
|
+
if (Ba("showClone", this), Q.eventCanceled) return;
|
|
3701
|
+
q.parentNode == X && !this.options.group.revertClone ? X.insertBefore(Z, q) : Ha ? X.insertBefore(Z, Ha) : X.appendChild(Z), this.options.group.revertClone && this.animate(q, Z), G(Z, "display", ""), Wa = !1;
|
|
3662
3702
|
}
|
|
3663
3703
|
}
|
|
3664
3704
|
};
|
|
3665
|
-
function
|
|
3705
|
+
function Ao(e) {
|
|
3666
3706
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3667
3707
|
}
|
|
3668
|
-
function
|
|
3669
|
-
var c, l = e[
|
|
3670
|
-
return window.CustomEvent && !
|
|
3708
|
+
function jo(e, t, n, r, i, a, o, s) {
|
|
3709
|
+
var c, l = e[ja], u = l.options.onMove, d;
|
|
3710
|
+
return window.CustomEvent && !ta && !na ? c = new CustomEvent("move", {
|
|
3671
3711
|
bubbles: !0,
|
|
3672
3712
|
cancelable: !0
|
|
3673
3713
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || K(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3674
3714
|
}
|
|
3675
|
-
function
|
|
3715
|
+
function Mo(e) {
|
|
3676
3716
|
e.draggable = !1;
|
|
3677
3717
|
}
|
|
3678
|
-
function
|
|
3679
|
-
|
|
3718
|
+
function No() {
|
|
3719
|
+
ho = !1;
|
|
3680
3720
|
}
|
|
3681
|
-
function
|
|
3682
|
-
var r = K(
|
|
3721
|
+
function Po(e, t, n) {
|
|
3722
|
+
var r = K(_a(n.el, 0, n.options, !0)), i = Aa(n.el, n.options, Y), a = 10;
|
|
3683
3723
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3684
3724
|
}
|
|
3685
|
-
function
|
|
3686
|
-
var r = K(
|
|
3725
|
+
function Fo(e, t, n) {
|
|
3726
|
+
var r = K(va(n.el, n.options.draggable)), i = Aa(n.el, n.options, Y), a = 10;
|
|
3687
3727
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3688
3728
|
}
|
|
3689
|
-
function
|
|
3729
|
+
function Io(e, t, n, r, i, a, o, s) {
|
|
3690
3730
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3691
3731
|
if (!o) {
|
|
3692
|
-
if (s &&
|
|
3693
|
-
if (!
|
|
3694
|
-
else if (
|
|
3695
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3732
|
+
if (s && fo < l * i) {
|
|
3733
|
+
if (!lo && (co === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (lo = !0), lo) f = !0;
|
|
3734
|
+
else if (co === 1 ? c < u + fo : c > d - fo) return -co;
|
|
3735
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Lo(t);
|
|
3696
3736
|
}
|
|
3697
3737
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3698
3738
|
}
|
|
3699
|
-
function
|
|
3700
|
-
return
|
|
3739
|
+
function Lo(e) {
|
|
3740
|
+
return ya(q) < ya(e) ? 1 : -1;
|
|
3701
3741
|
}
|
|
3702
|
-
function
|
|
3742
|
+
function Ro(e) {
|
|
3703
3743
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3704
3744
|
return r.toString(36);
|
|
3705
3745
|
}
|
|
3706
|
-
function
|
|
3707
|
-
|
|
3746
|
+
function zo(e) {
|
|
3747
|
+
go.length = 0;
|
|
3708
3748
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3709
3749
|
var r = t[n];
|
|
3710
|
-
r.checked &&
|
|
3750
|
+
r.checked && go.push(r);
|
|
3711
3751
|
}
|
|
3712
3752
|
}
|
|
3713
|
-
function
|
|
3753
|
+
function Bo(e) {
|
|
3714
3754
|
return setTimeout(e, 0);
|
|
3715
3755
|
}
|
|
3716
|
-
function
|
|
3756
|
+
function Vo(e) {
|
|
3717
3757
|
return clearTimeout(e);
|
|
3718
3758
|
}
|
|
3719
|
-
|
|
3720
|
-
(Q.active ||
|
|
3759
|
+
_o && U(document, "touchmove", function(e) {
|
|
3760
|
+
(Q.active || Za) && e.cancelable && e.preventDefault();
|
|
3721
3761
|
}), Q.utils = {
|
|
3722
3762
|
on: U,
|
|
3723
3763
|
off: W,
|
|
3724
3764
|
css: G,
|
|
3725
|
-
find:
|
|
3765
|
+
find: ma,
|
|
3726
3766
|
is: function(e, t) {
|
|
3727
|
-
return !!
|
|
3767
|
+
return !!ua(e, t, e, !1);
|
|
3728
3768
|
},
|
|
3729
|
-
extend:
|
|
3730
|
-
throttle:
|
|
3731
|
-
closest:
|
|
3732
|
-
toggleClass:
|
|
3733
|
-
clone:
|
|
3734
|
-
index:
|
|
3735
|
-
nextTick:
|
|
3736
|
-
cancelNextTick:
|
|
3737
|
-
detectDirection:
|
|
3738
|
-
getChild:
|
|
3769
|
+
extend: Ca,
|
|
3770
|
+
throttle: Ea,
|
|
3771
|
+
closest: ua,
|
|
3772
|
+
toggleClass: fa,
|
|
3773
|
+
clone: ka,
|
|
3774
|
+
index: ya,
|
|
3775
|
+
nextTick: Bo,
|
|
3776
|
+
cancelNextTick: Vo,
|
|
3777
|
+
detectDirection: So,
|
|
3778
|
+
getChild: _a
|
|
3739
3779
|
}, Q.get = function(e) {
|
|
3740
|
-
return e[
|
|
3780
|
+
return e[ja];
|
|
3741
3781
|
}, Q.mount = function() {
|
|
3742
3782
|
var e = [...arguments];
|
|
3743
3783
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3744
3784
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3745
|
-
e.utils && (Q.utils =
|
|
3785
|
+
e.utils && (Q.utils = qi(qi({}, Q.utils), e.utils)), La.mount(e);
|
|
3746
3786
|
});
|
|
3747
3787
|
}, Q.create = function(e, t) {
|
|
3748
3788
|
return new Q(e, t);
|
|
3749
|
-
}, Q.version =
|
|
3750
|
-
var $ = [],
|
|
3751
|
-
function
|
|
3789
|
+
}, Q.version = $i;
|
|
3790
|
+
var $ = [], Ho, Uo, Wo = !1, Go, Ko, qo, Jo;
|
|
3791
|
+
function Yo() {
|
|
3752
3792
|
function e() {
|
|
3753
3793
|
for (var e in this.defaults = {
|
|
3754
3794
|
scroll: !0,
|
|
@@ -3768,63 +3808,63 @@ function Ko() {
|
|
|
3768
3808
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3769
3809
|
},
|
|
3770
3810
|
drop: function() {
|
|
3771
|
-
this.sortable.nativeDraggable ? W(document, "dragover", this._handleAutoScroll) : (W(document, "pointermove", this._handleFallbackAutoScroll), W(document, "touchmove", this._handleFallbackAutoScroll), W(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3811
|
+
this.sortable.nativeDraggable ? W(document, "dragover", this._handleAutoScroll) : (W(document, "pointermove", this._handleFallbackAutoScroll), W(document, "touchmove", this._handleFallbackAutoScroll), W(document, "mousemove", this._handleFallbackAutoScroll)), Zo(), Xo(), Da();
|
|
3772
3812
|
},
|
|
3773
3813
|
nulling: function() {
|
|
3774
|
-
|
|
3814
|
+
qo = Uo = Ho = Wo = Jo = Go = Ko = null, $.length = 0;
|
|
3775
3815
|
},
|
|
3776
3816
|
_handleFallbackAutoScroll: function(e) {
|
|
3777
3817
|
this._handleAutoScroll(e, !0);
|
|
3778
3818
|
},
|
|
3779
3819
|
_handleAutoScroll: function(e, t) {
|
|
3780
3820
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3781
|
-
if (
|
|
3782
|
-
|
|
3783
|
-
var o =
|
|
3784
|
-
|
|
3785
|
-
var a =
|
|
3786
|
-
a !== o && (o = a,
|
|
3787
|
-
}, 10),
|
|
3821
|
+
if (qo = e, t || this.options.forceAutoScrollFallback || na || ta || ia) {
|
|
3822
|
+
Qo(e, this.options, a, t);
|
|
3823
|
+
var o = Sa(a, !0);
|
|
3824
|
+
Wo && (!Jo || r !== Go || i !== Ko) && (Jo && Zo(), Jo = setInterval(function() {
|
|
3825
|
+
var a = Sa(document.elementFromPoint(r, i), !0);
|
|
3826
|
+
a !== o && (o = a, Xo()), Qo(e, n.options, a, t);
|
|
3827
|
+
}, 10), Go = r, Ko = i);
|
|
3788
3828
|
} else {
|
|
3789
|
-
if (!this.options.bubbleScroll ||
|
|
3790
|
-
|
|
3829
|
+
if (!this.options.bubbleScroll || Sa(a, !0) === ha()) {
|
|
3830
|
+
Xo();
|
|
3791
3831
|
return;
|
|
3792
3832
|
}
|
|
3793
|
-
|
|
3833
|
+
Qo(e, this.options, Sa(a, !1), !1);
|
|
3794
3834
|
}
|
|
3795
3835
|
}
|
|
3796
|
-
},
|
|
3836
|
+
}, Xi(e, {
|
|
3797
3837
|
pluginName: "scroll",
|
|
3798
3838
|
initializeByDefault: !0
|
|
3799
3839
|
});
|
|
3800
3840
|
}
|
|
3801
|
-
function
|
|
3841
|
+
function Xo() {
|
|
3802
3842
|
$.forEach(function(e) {
|
|
3803
3843
|
clearInterval(e.pid);
|
|
3804
3844
|
}), $ = [];
|
|
3805
3845
|
}
|
|
3806
|
-
function
|
|
3807
|
-
clearInterval(
|
|
3846
|
+
function Zo() {
|
|
3847
|
+
clearInterval(Jo);
|
|
3808
3848
|
}
|
|
3809
|
-
var
|
|
3849
|
+
var Qo = Ea(function(e, t, n, r) {
|
|
3810
3850
|
if (t.scroll) {
|
|
3811
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3812
|
-
|
|
3813
|
-
var d = 0, f =
|
|
3851
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = ha(), l = !1, u;
|
|
3852
|
+
Uo !== n && (Uo = n, Xo(), Ho = t.scroll, u = t.scrollFn, Ho === !0 && (Ho = Sa(n, !0)));
|
|
3853
|
+
var d = 0, f = Ho;
|
|
3814
3854
|
do {
|
|
3815
|
-
var p = f, m = K(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, ee = void 0, te = p.scrollWidth,
|
|
3816
|
-
p === c ? (x = y < te && (
|
|
3817
|
-
var
|
|
3818
|
-
if (!$[d]) for (var
|
|
3819
|
-
($[d].vx !=
|
|
3820
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3855
|
+
var p = f, m = K(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, ee = void 0, te = p.scrollWidth, S = p.scrollHeight, C = G(p), ne = p.scrollLeft, re = p.scrollTop;
|
|
3856
|
+
p === c ? (x = y < te && (C.overflowX === "auto" || C.overflowX === "scroll" || C.overflowX === "visible"), ee = b < S && (C.overflowY === "auto" || C.overflowY === "scroll" || C.overflowY === "visible")) : (x = y < te && (C.overflowX === "auto" || C.overflowX === "scroll"), ee = b < S && (C.overflowY === "auto" || C.overflowY === "scroll"));
|
|
3857
|
+
var ie = x && (Math.abs(v - i) <= o && ne + y < te) - (Math.abs(_ - i) <= o && !!ne), ae = ee && (Math.abs(g - a) <= o && re + b < S) - (Math.abs(h - a) <= o && !!re);
|
|
3858
|
+
if (!$[d]) for (var oe = 0; oe <= d; oe++) $[oe] || ($[oe] = {});
|
|
3859
|
+
($[d].vx != ie || $[d].vy != ae || $[d].el !== p) && ($[d].el = p, $[d].vx = ie, $[d].vy = ae, clearInterval($[d].pid), (ie != 0 || ae != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3860
|
+
r && this.layer === 0 && Q.active._onTouchMove(qo);
|
|
3821
3861
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3822
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3862
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[ja], n, t, e, qo, $[this.layer].el) !== "continue" || Oa($[this.layer].el, n, t);
|
|
3823
3863
|
}.bind({ layer: d }), 24))), d++;
|
|
3824
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3825
|
-
|
|
3864
|
+
} while (t.bubbleScroll && f !== c && (f = Sa(f, !1)));
|
|
3865
|
+
Wo = l;
|
|
3826
3866
|
}
|
|
3827
|
-
}, 30),
|
|
3867
|
+
}, 30), $o = function(e) {
|
|
3828
3868
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3829
3869
|
if (t) {
|
|
3830
3870
|
var c = n || i;
|
|
@@ -3836,8 +3876,8 @@ var Yo = Ca(function(e, t, n, r) {
|
|
|
3836
3876
|
}));
|
|
3837
3877
|
}
|
|
3838
3878
|
};
|
|
3839
|
-
function
|
|
3840
|
-
|
|
3879
|
+
function es() {}
|
|
3880
|
+
es.prototype = {
|
|
3841
3881
|
startIndex: null,
|
|
3842
3882
|
dragStart: function(e) {
|
|
3843
3883
|
var t = e.oldDraggableIndex;
|
|
@@ -3846,72 +3886,72 @@ Zo.prototype = {
|
|
|
3846
3886
|
onSpill: function(e) {
|
|
3847
3887
|
var t = e.dragEl, n = e.putSortable;
|
|
3848
3888
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3849
|
-
var r =
|
|
3889
|
+
var r = _a(this.sortable.el, this.startIndex, this.options);
|
|
3850
3890
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3851
3891
|
},
|
|
3852
|
-
drop:
|
|
3853
|
-
},
|
|
3854
|
-
function
|
|
3855
|
-
|
|
3892
|
+
drop: $o
|
|
3893
|
+
}, Xi(es, { pluginName: "revertOnSpill" });
|
|
3894
|
+
function ts() {}
|
|
3895
|
+
ts.prototype = {
|
|
3856
3896
|
onSpill: function(e) {
|
|
3857
3897
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3858
3898
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3859
3899
|
},
|
|
3860
|
-
drop:
|
|
3861
|
-
},
|
|
3862
|
-
function
|
|
3900
|
+
drop: $o
|
|
3901
|
+
}, Xi(ts, { pluginName: "removeOnSpill" }), Q.mount(new Yo()), Q.mount(ts, es);
|
|
3902
|
+
function ns(e) {
|
|
3863
3903
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3864
3904
|
}
|
|
3865
|
-
function
|
|
3905
|
+
function rs(e) {
|
|
3866
3906
|
Ge() && rt(e);
|
|
3867
3907
|
}
|
|
3868
|
-
function
|
|
3908
|
+
function is(e) {
|
|
3869
3909
|
Ge() ? nt(e) : Ze(e);
|
|
3870
3910
|
}
|
|
3871
|
-
var
|
|
3872
|
-
function
|
|
3873
|
-
|
|
3911
|
+
var as = null, os = null;
|
|
3912
|
+
function ss(e = null, t = null) {
|
|
3913
|
+
as = e, os = t;
|
|
3874
3914
|
}
|
|
3875
|
-
function
|
|
3915
|
+
function cs() {
|
|
3876
3916
|
return {
|
|
3877
|
-
data:
|
|
3878
|
-
clonedData:
|
|
3917
|
+
data: as,
|
|
3918
|
+
clonedData: os
|
|
3879
3919
|
};
|
|
3880
3920
|
}
|
|
3881
|
-
var
|
|
3882
|
-
function
|
|
3921
|
+
var ls = Symbol("cloneElement");
|
|
3922
|
+
function us(...e) {
|
|
3883
3923
|
let t = Ge()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3884
3924
|
Array.isArray(R(i)) || (a = i, i = null);
|
|
3885
|
-
let o = null, { immediate: s = !0, clone: c =
|
|
3925
|
+
let o = null, { immediate: s = !0, clone: c = ns, forceFallback: l, fallbackOnBody: u, customUpdate: d } = R(a) ?? {};
|
|
3886
3926
|
function f(e) {
|
|
3887
3927
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3888
3928
|
n = l && !u ? o.slice(0, -1) : o;
|
|
3889
3929
|
let s = R(R(i)?.[r]), d = c(s);
|
|
3890
|
-
|
|
3930
|
+
ss(s, d), a[ls] = d;
|
|
3891
3931
|
}
|
|
3892
3932
|
function p(e) {
|
|
3893
|
-
let t = e.item[
|
|
3894
|
-
if (!
|
|
3895
|
-
if (
|
|
3933
|
+
let t = e.item[ls];
|
|
3934
|
+
if (!Fi(t)) {
|
|
3935
|
+
if (Ri(e.item), Ye(i)) {
|
|
3896
3936
|
let n = [...R(i)];
|
|
3897
|
-
i.value =
|
|
3937
|
+
i.value = Pi(n, e.newDraggableIndex, t);
|
|
3898
3938
|
return;
|
|
3899
3939
|
}
|
|
3900
|
-
|
|
3940
|
+
Pi(R(i), e.newDraggableIndex, t);
|
|
3901
3941
|
}
|
|
3902
3942
|
}
|
|
3903
3943
|
function m(e) {
|
|
3904
3944
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3905
|
-
if (
|
|
3906
|
-
|
|
3945
|
+
if (Li(t, n, r), o === "clone") {
|
|
3946
|
+
Ri(s);
|
|
3907
3947
|
return;
|
|
3908
3948
|
}
|
|
3909
3949
|
if (Ye(i)) {
|
|
3910
3950
|
let e = [...R(i)];
|
|
3911
|
-
i.value =
|
|
3951
|
+
i.value = Ni(e, a);
|
|
3912
3952
|
return;
|
|
3913
3953
|
}
|
|
3914
|
-
|
|
3954
|
+
Ni(R(i), a);
|
|
3915
3955
|
}
|
|
3916
3956
|
function h(e) {
|
|
3917
3957
|
if (d) {
|
|
@@ -3919,12 +3959,12 @@ function ss(...e) {
|
|
|
3919
3959
|
return;
|
|
3920
3960
|
}
|
|
3921
3961
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3922
|
-
if (
|
|
3962
|
+
if (Ri(n), Li(t, n, r), Ye(i)) {
|
|
3923
3963
|
let e = [...R(i)];
|
|
3924
|
-
i.value =
|
|
3964
|
+
i.value = Ai(e, a, o);
|
|
3925
3965
|
return;
|
|
3926
3966
|
}
|
|
3927
|
-
|
|
3967
|
+
Ai(R(i), a, o);
|
|
3928
3968
|
}
|
|
3929
3969
|
function g(e) {
|
|
3930
3970
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3943,7 +3983,7 @@ function ss(...e) {
|
|
|
3943
3983
|
n = null;
|
|
3944
3984
|
}
|
|
3945
3985
|
Ze(() => {
|
|
3946
|
-
if (
|
|
3986
|
+
if (ss(), o) throw o;
|
|
3947
3987
|
});
|
|
3948
3988
|
}
|
|
3949
3989
|
let _ = {
|
|
@@ -3955,19 +3995,19 @@ function ss(...e) {
|
|
|
3955
3995
|
};
|
|
3956
3996
|
function v(e) {
|
|
3957
3997
|
let n = R(r);
|
|
3958
|
-
return e ||=
|
|
3998
|
+
return e ||= Ii(n) ? zi(n, t?.$el) : n, e && !Hi(e) && (e = e.$el), e || ki("Root element not found"), e;
|
|
3959
3999
|
}
|
|
3960
4000
|
function y() {
|
|
3961
|
-
let e = R(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3962
|
-
return
|
|
3963
|
-
|
|
3964
|
-
}),
|
|
4001
|
+
let e = R(a) ?? {}, { immediate: t, clone: n } = e, r = Ei(e, ["immediate", "clone"]);
|
|
4002
|
+
return Ui(r, (e, t) => {
|
|
4003
|
+
Wi(e) && (r[e] = (e, ...n) => (Gi(e, cs()), t(e, ...n)));
|
|
4004
|
+
}), Vi(i === null ? {} : _, r);
|
|
3965
4005
|
}
|
|
3966
4006
|
let b = (e) => {
|
|
3967
4007
|
e = v(e), o && x.destroy(), o = new Q(e, y());
|
|
3968
4008
|
};
|
|
3969
4009
|
mt(() => a, () => {
|
|
3970
|
-
o &&
|
|
4010
|
+
o && Ui(y(), (e, t) => {
|
|
3971
4011
|
o?.option(e, t);
|
|
3972
4012
|
});
|
|
3973
4013
|
}, { deep: !0 });
|
|
@@ -3980,15 +4020,15 @@ function ss(...e) {
|
|
|
3980
4020
|
toArray: () => o?.toArray(),
|
|
3981
4021
|
closest: (...e) => o?.closest(...e)
|
|
3982
4022
|
};
|
|
3983
|
-
return
|
|
4023
|
+
return is(() => {
|
|
3984
4024
|
s && b();
|
|
3985
|
-
}),
|
|
4025
|
+
}), rs(x.destroy), Ti({
|
|
3986
4026
|
start: b,
|
|
3987
4027
|
pause: () => x?.option("disabled", !0),
|
|
3988
4028
|
resume: () => x?.option("disabled", !1)
|
|
3989
4029
|
}, x);
|
|
3990
4030
|
}
|
|
3991
|
-
var
|
|
4031
|
+
var ds = [
|
|
3992
4032
|
"update",
|
|
3993
4033
|
"start",
|
|
3994
4034
|
"add",
|
|
@@ -4001,7 +4041,7 @@ var cs = [
|
|
|
4001
4041
|
"clone",
|
|
4002
4042
|
"move",
|
|
4003
4043
|
"change"
|
|
4004
|
-
],
|
|
4044
|
+
], fs = [
|
|
4005
4045
|
"clone",
|
|
4006
4046
|
"animation",
|
|
4007
4047
|
"ghostClass",
|
|
@@ -4045,7 +4085,7 @@ var cs = [
|
|
|
4045
4085
|
"tag",
|
|
4046
4086
|
"target",
|
|
4047
4087
|
"customUpdate",
|
|
4048
|
-
...
|
|
4088
|
+
...ds.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4049
4089
|
];
|
|
4050
4090
|
N({
|
|
4051
4091
|
name: "VueDraggable",
|
|
@@ -4053,33 +4093,34 @@ N({
|
|
|
4053
4093
|
prop: "modelValue",
|
|
4054
4094
|
event: "update:modelValue"
|
|
4055
4095
|
},
|
|
4056
|
-
props:
|
|
4057
|
-
emits: ["update:modelValue", ...
|
|
4096
|
+
props: fs,
|
|
4097
|
+
emits: ["update:modelValue", ...ds],
|
|
4058
4098
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
4059
|
-
let a =
|
|
4099
|
+
let a = ds.reduce((e, t) => {
|
|
4060
4100
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
4061
4101
|
return e[r] = (...e) => n(t, ...e), e;
|
|
4062
4102
|
}, {}), o = D(() => {
|
|
4063
|
-
let t = lt(e), { modelValue: n } = t, r =
|
|
4103
|
+
let t = lt(e), { modelValue: n } = t, r = Ei(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
4064
4104
|
let r = R(n);
|
|
4065
4105
|
return r !== void 0 && (e[t] = r), e;
|
|
4066
4106
|
}, {});
|
|
4067
|
-
return
|
|
4107
|
+
return Ti(Ti({}, a), Mi(Ti(Ti({}, i), o)));
|
|
4068
4108
|
}), s = D({
|
|
4069
4109
|
get: () => e.modelValue,
|
|
4070
4110
|
set: (e) => n("update:modelValue", e)
|
|
4071
|
-
}), c = I(), l = at(
|
|
4111
|
+
}), c = I(), l = at(us(e.target || c, s, o));
|
|
4072
4112
|
return r(l), () => qe(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
4073
4113
|
}
|
|
4074
4114
|
});
|
|
4075
|
-
var
|
|
4115
|
+
var ps = {
|
|
4076
4116
|
mounted: "mounted",
|
|
4077
4117
|
unmounted: "unmounted"
|
|
4078
4118
|
};
|
|
4079
|
-
|
|
4119
|
+
ps.mounted, ps.unmounted;
|
|
4080
4120
|
//#endregion
|
|
4081
4121
|
//#region src/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.ts
|
|
4082
|
-
|
|
4122
|
+
var ms = 24;
|
|
4123
|
+
function hs(e, t) {
|
|
4083
4124
|
let n = Array.from(t.children), r = Array.from(e.children), i = t.getBoundingClientRect();
|
|
4084
4125
|
e.style.width = `${i.width}px`, e.style.minWidth = `${i.width}px`, e.style.maxWidth = `${i.width}px`;
|
|
4085
4126
|
for (let [e, t] of r.entries()) {
|
|
@@ -4089,51 +4130,69 @@ function ds(e, t) {
|
|
|
4089
4130
|
t.style.boxSizing = "border-box", t.style.width = `${i.width}px`, t.style.minWidth = `${i.width}px`, t.style.maxWidth = `${i.width}px`;
|
|
4090
4131
|
}
|
|
4091
4132
|
}
|
|
4092
|
-
function
|
|
4093
|
-
let t = I(!1), n = I(0), r =
|
|
4094
|
-
function l() {
|
|
4095
|
-
return e.tbodyRef.value?.closest("table") ?? null;
|
|
4096
|
-
}
|
|
4097
|
-
function u() {
|
|
4098
|
-
let e = l();
|
|
4099
|
-
e !== null && (c = e.style.minHeight, e.style.minHeight = `${e.getBoundingClientRect().height}px`);
|
|
4100
|
-
}
|
|
4133
|
+
function gs(e) {
|
|
4134
|
+
let t = I(!1), n = I(0), r = I(null), i = !1, a = !1, o = null, s = null, c = "", l = "", u = "";
|
|
4101
4135
|
function d() {
|
|
4102
|
-
|
|
4103
|
-
e !== null && (e.style.minHeight = c);
|
|
4136
|
+
return e.tbodyRef.value?.closest("table") ?? null;
|
|
4104
4137
|
}
|
|
4105
4138
|
function f() {
|
|
4106
|
-
|
|
4139
|
+
let e = d();
|
|
4140
|
+
e !== null && (u = e.style.minHeight, e.style.minHeight = `${e.getBoundingClientRect().height}px`);
|
|
4107
4141
|
}
|
|
4108
4142
|
function p() {
|
|
4109
|
-
|
|
4143
|
+
let e = d();
|
|
4144
|
+
e !== null && (e.style.minHeight = u);
|
|
4110
4145
|
}
|
|
4111
4146
|
function m() {
|
|
4112
|
-
|
|
4147
|
+
typeof document > "u" || (c = document.body.style.userSelect, l = document.body.style.webkitUserSelect, document.body.style.userSelect = "none", document.body.style.webkitUserSelect = "none", window.getSelection()?.removeAllRanges());
|
|
4113
4148
|
}
|
|
4114
|
-
function h(
|
|
4115
|
-
|
|
4149
|
+
function h() {
|
|
4150
|
+
typeof document > "u" || (document.body.style.userSelect = c, document.body.style.webkitUserSelect = l);
|
|
4116
4151
|
}
|
|
4117
4152
|
function g() {
|
|
4118
|
-
|
|
4153
|
+
t.value = !1, v(), p(), h();
|
|
4119
4154
|
}
|
|
4120
4155
|
function _(e) {
|
|
4156
|
+
o = {
|
|
4157
|
+
x: e.clientX,
|
|
4158
|
+
y: e.clientY
|
|
4159
|
+
}, r.value = b(e.clientX);
|
|
4160
|
+
}
|
|
4161
|
+
function v() {
|
|
4162
|
+
document.removeEventListener("pointermove", _), o = null, s = null, r.value = null;
|
|
4163
|
+
}
|
|
4164
|
+
function y(e) {
|
|
4121
4165
|
let { originalEvent: t } = e;
|
|
4122
4166
|
if (t == null) return null;
|
|
4123
|
-
if ("clientY" in t && typeof t.clientY == "number") return
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4167
|
+
if ("clientX" in t && typeof t.clientX == "number" && "clientY" in t && typeof t.clientY == "number") return {
|
|
4168
|
+
x: t.clientX,
|
|
4169
|
+
y: t.clientY
|
|
4170
|
+
};
|
|
4171
|
+
let n = t.changedTouches?.[0];
|
|
4172
|
+
return n === void 0 ? null : {
|
|
4173
|
+
x: n.clientX,
|
|
4174
|
+
y: n.clientY
|
|
4175
|
+
};
|
|
4176
|
+
}
|
|
4177
|
+
function b(e) {
|
|
4178
|
+
if (s === null) return null;
|
|
4179
|
+
let t = e - s;
|
|
4180
|
+
return t >= ms ? "group" : t <= -24 ? "root" : null;
|
|
4181
|
+
}
|
|
4182
|
+
function x(e) {
|
|
4183
|
+
let t = (y(e) ?? o)?.x;
|
|
4184
|
+
return t === void 0 ? r.value : b(t);
|
|
4185
|
+
}
|
|
4186
|
+
function ee(t) {
|
|
4187
|
+
let n = (y(t) ?? o)?.y, r = e.tbodyRef.value, i = t.oldDraggableIndex;
|
|
4188
|
+
if (n === void 0 || r === null || i === void 0) return null;
|
|
4189
|
+
let a = Array.from(r.querySelectorAll("tr[data-line-item-row]")), s = a.findIndex((e) => {
|
|
4131
4190
|
let t = e.getBoundingClientRect();
|
|
4132
4191
|
return n < t.top + t.height / 2;
|
|
4133
|
-
}), c = s === -1 ?
|
|
4192
|
+
}), c = s === -1 ? a.length : s;
|
|
4134
4193
|
return c > i ? c - 1 : c;
|
|
4135
4194
|
}
|
|
4136
|
-
let
|
|
4195
|
+
let te = D({
|
|
4137
4196
|
get: () => ({
|
|
4138
4197
|
animation: 150,
|
|
4139
4198
|
bubbleScroll: !0,
|
|
@@ -4152,174 +4211,175 @@ function fs(e) {
|
|
|
4152
4211
|
scrollSensitivity: 80,
|
|
4153
4212
|
scrollSpeed: 12,
|
|
4154
4213
|
onClone: (e) => {
|
|
4155
|
-
|
|
4214
|
+
hs(e.clone, e.item);
|
|
4156
4215
|
},
|
|
4157
4216
|
onEnd: (t) => {
|
|
4158
|
-
let
|
|
4159
|
-
!
|
|
4217
|
+
let r = ee(t), o = a;
|
|
4218
|
+
!a && t.oldDraggableIndex !== void 0 && r !== null && t.oldDraggableIndex !== r && (e.moveLineByIndex(t.oldDraggableIndex, r, x(t)), e.saveNow(), o = !0), (o || i) && (n.value += 1), i = !1, a = !1, g();
|
|
4160
4219
|
},
|
|
4161
4220
|
onStart: (e) => {
|
|
4162
|
-
|
|
4221
|
+
m(), f(), document.addEventListener("pointermove", _), s = y(e)?.x ?? null, r.value = null, a = !1, i = e.item instanceof HTMLElement && e.item.dataset.lineItemRowType === "group", t.value = !0;
|
|
4163
4222
|
},
|
|
4164
4223
|
onUpdate: (t) => {
|
|
4165
|
-
t.oldDraggableIndex !== void 0 && t.newDraggableIndex !== void 0 && t.oldDraggableIndex !== t.newDraggableIndex && (
|
|
4224
|
+
t.oldDraggableIndex !== void 0 && t.newDraggableIndex !== void 0 && t.oldDraggableIndex !== t.newDraggableIndex && (a = !0, e.moveLineByIndex(t.oldDraggableIndex, t.newDraggableIndex, x(t)), e.saveNow());
|
|
4166
4225
|
}
|
|
4167
4226
|
}),
|
|
4168
4227
|
set: () => {}
|
|
4169
|
-
}),
|
|
4170
|
-
function
|
|
4228
|
+
}), S = us(e.tbodyRef, te);
|
|
4229
|
+
function C() {
|
|
4171
4230
|
let t = e.tbodyRef.value;
|
|
4172
|
-
t !== null &&
|
|
4231
|
+
t !== null && S.start(t);
|
|
4173
4232
|
}
|
|
4174
4233
|
return tt(() => {
|
|
4175
|
-
|
|
4234
|
+
v(), p(), h();
|
|
4176
4235
|
}), {
|
|
4177
4236
|
isDragging: t,
|
|
4178
4237
|
dragVersion: n,
|
|
4179
|
-
|
|
4238
|
+
dropIntent: r,
|
|
4239
|
+
restart: C
|
|
4180
4240
|
};
|
|
4181
4241
|
}
|
|
4182
4242
|
//#endregion
|
|
4183
4243
|
//#region src/ui/billing-document/table/BillingDocumentLineItemsTableGrid.vue?vue&type=script&setup=true&lang.ts
|
|
4184
|
-
var
|
|
4244
|
+
var _s = { class: "relative" }, vs = { class: "border-b border-secondary bg-secondary" }, ys = {
|
|
4185
4245
|
key: 0,
|
|
4186
4246
|
class: "h-11 px-xs py-sm"
|
|
4187
|
-
},
|
|
4247
|
+
}, bs = {
|
|
4188
4248
|
key: 1,
|
|
4189
4249
|
class: "h-11 px-xs py-sm"
|
|
4190
|
-
},
|
|
4250
|
+
}, xs = {
|
|
4191
4251
|
key: 2,
|
|
4192
4252
|
class: "h-11 px-md py-sm"
|
|
4193
|
-
},
|
|
4253
|
+
}, Ss = ["data-drop-intent"], Cs = {
|
|
4194
4254
|
key: 0,
|
|
4195
4255
|
class: "h-0"
|
|
4196
|
-
},
|
|
4256
|
+
}, ws = ["colspan"], Ts = {
|
|
4197
4257
|
key: 0,
|
|
4198
4258
|
class: "h-5"
|
|
4199
|
-
},
|
|
4259
|
+
}, Es = ["colspan"], Ds = { key: 1 }, Os = ["colspan"], ks = {
|
|
4200
4260
|
key: 0,
|
|
4201
4261
|
class: "pointer-events-none absolute inset-y-0 left-0 z-20 flex w-16 items-center justify-start bg-linear-to-r from-primary via-primary/90 to-transparent pl-xs"
|
|
4202
|
-
},
|
|
4262
|
+
}, As = {
|
|
4203
4263
|
key: 1,
|
|
4204
4264
|
class: "pointer-events-none absolute inset-y-0 right-0 z-20 flex w-16 items-center justify-end bg-linear-to-l from-primary via-primary/90 to-transparent pr-xs"
|
|
4205
|
-
},
|
|
4265
|
+
}, js = /* @__PURE__ */ N({
|
|
4206
4266
|
__name: "BillingDocumentLineItemsTableGrid",
|
|
4207
|
-
setup(
|
|
4208
|
-
let
|
|
4209
|
-
label: Ae.getLabel(e,
|
|
4267
|
+
setup(e) {
|
|
4268
|
+
let t = T(), n = ar(), r = ee(), i = D(() => n.lineCustomFieldDefinitions.value.map((e) => ({
|
|
4269
|
+
label: Ae.getLabel(e, t.locale.value),
|
|
4210
4270
|
widthInRem: 12
|
|
4211
|
-
}))),
|
|
4212
|
-
let e =
|
|
4271
|
+
}))), a = D(() => {
|
|
4272
|
+
let e = de(), a = e.map((e) => H.createBillingDocumentLineItemTotals(e)), o = fe(e.map((e) => e.quantity), 5, 8), s = fe(e.map((e) => e.unitPrice), 7, 11), c = fe(e.map((e) => e.discountPercentage?.getValue() ?? 0), 6.5, 9), l = fe(a.map((e) => e.net), 8, 12), u = fe(a.map((e) => e.gross), 8, 12), d = [
|
|
4213
4273
|
{
|
|
4214
|
-
isHidden: !
|
|
4274
|
+
isHidden: !n.isEditable.value,
|
|
4215
4275
|
widthInRem: 2.5
|
|
4216
4276
|
},
|
|
4217
4277
|
{
|
|
4218
|
-
isHidden: !
|
|
4278
|
+
isHidden: !n.isEditable.value,
|
|
4219
4279
|
widthInRem: 3
|
|
4220
4280
|
},
|
|
4221
4281
|
{
|
|
4222
|
-
label:
|
|
4282
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.item"),
|
|
4223
4283
|
widthInRem: 16
|
|
4224
4284
|
},
|
|
4225
4285
|
{
|
|
4226
|
-
label:
|
|
4286
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.item_description"),
|
|
4227
4287
|
widthInRem: 16
|
|
4228
4288
|
},
|
|
4229
|
-
...
|
|
4289
|
+
...i.value,
|
|
4230
4290
|
{
|
|
4231
4291
|
align: "right",
|
|
4232
|
-
label:
|
|
4292
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.qty"),
|
|
4233
4293
|
widthInRem: o
|
|
4234
4294
|
},
|
|
4235
4295
|
{
|
|
4236
|
-
label:
|
|
4296
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.unit"),
|
|
4237
4297
|
widthInRem: 7
|
|
4238
4298
|
},
|
|
4239
4299
|
{
|
|
4240
4300
|
align: "right",
|
|
4241
|
-
label:
|
|
4301
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.unit_price"),
|
|
4242
4302
|
widthInRem: s
|
|
4243
4303
|
},
|
|
4244
|
-
...
|
|
4304
|
+
...r.isLineDiscountEnabled.value ? [{
|
|
4245
4305
|
align: "right",
|
|
4246
|
-
label:
|
|
4306
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.discount"),
|
|
4247
4307
|
widthInRem: c
|
|
4248
4308
|
}] : [],
|
|
4249
4309
|
{
|
|
4250
4310
|
align: "right",
|
|
4251
|
-
label:
|
|
4311
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.price_excl_vat"),
|
|
4252
4312
|
widthInRem: l
|
|
4253
4313
|
},
|
|
4254
4314
|
{
|
|
4255
|
-
label:
|
|
4315
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.vat"),
|
|
4256
4316
|
widthInRem: 5
|
|
4257
4317
|
},
|
|
4258
4318
|
{
|
|
4259
4319
|
align: "right",
|
|
4260
|
-
label:
|
|
4320
|
+
label: t.t("wise_invoicing.invoice.detail.line_items.total"),
|
|
4261
4321
|
widthInRem: u
|
|
4262
4322
|
},
|
|
4263
4323
|
{
|
|
4264
|
-
isHidden: !
|
|
4324
|
+
isHidden: !n.isEditable.value,
|
|
4265
4325
|
minWidthInRem: 4.5
|
|
4266
4326
|
}
|
|
4267
4327
|
];
|
|
4268
|
-
return
|
|
4269
|
-
}),
|
|
4270
|
-
function
|
|
4271
|
-
let e =
|
|
4328
|
+
return n.isEditable.value ? d : d.filter((e) => !e.isHidden);
|
|
4329
|
+
}), o = D(() => a.value.length), s = D(() => a.value.filter((e) => e.label !== void 0)), c = D(() => Math.max(s.value.length - 1, 1)), l = n.displayRows, u = ft("tbodyRef"), d = ft("scrollContainerRef"), f = ft("tableRef"), p = I(!1), m = I(!1);
|
|
4330
|
+
function h() {
|
|
4331
|
+
let e = d.value;
|
|
4272
4332
|
if (e === null) {
|
|
4273
|
-
|
|
4333
|
+
p.value = !1, m.value = !1;
|
|
4274
4334
|
return;
|
|
4275
4335
|
}
|
|
4276
4336
|
let t = e.scrollWidth - e.clientWidth - e.scrollLeft;
|
|
4277
|
-
|
|
4337
|
+
p.value = e.scrollLeft > 1, m.value = t > 1;
|
|
4278
4338
|
}
|
|
4279
|
-
function
|
|
4280
|
-
let t =
|
|
4339
|
+
function g(e) {
|
|
4340
|
+
let t = d.value;
|
|
4281
4341
|
t !== null && t.scrollBy({
|
|
4282
4342
|
behavior: "smooth",
|
|
4283
4343
|
left: e * Math.max(t.clientWidth * .75, 320)
|
|
4284
4344
|
});
|
|
4285
4345
|
}
|
|
4286
|
-
St(
|
|
4287
|
-
let { isDragging:
|
|
4288
|
-
isEditable:
|
|
4289
|
-
moveLineByIndex: (e, t) => {
|
|
4290
|
-
|
|
4346
|
+
St(d, h), St(f, h), nt(h);
|
|
4347
|
+
let { isDragging: _, dragVersion: v, dropIntent: y, restart: b } = gs({
|
|
4348
|
+
isEditable: n.isEditable,
|
|
4349
|
+
moveLineByIndex: (e, t, r) => {
|
|
4350
|
+
n.mutations.moveLineByIndex(me(e), me(t), r);
|
|
4291
4351
|
},
|
|
4292
|
-
saveNow:
|
|
4293
|
-
tbodyRef:
|
|
4352
|
+
saveNow: n.saveNow,
|
|
4353
|
+
tbodyRef: u
|
|
4294
4354
|
});
|
|
4295
4355
|
function x(e) {
|
|
4296
|
-
let t =
|
|
4297
|
-
return t === -1 ? null :
|
|
4356
|
+
let t = n.rows.value.findIndex((t) => t.id === e);
|
|
4357
|
+
return t === -1 ? null : n.mutations.addLine(t + 1);
|
|
4298
4358
|
}
|
|
4299
|
-
function
|
|
4300
|
-
let t =
|
|
4301
|
-
if (
|
|
4359
|
+
function te(e) {
|
|
4360
|
+
let t = n.rows.value, r = t.findIndex((t) => t.id === e);
|
|
4361
|
+
if (r === -1) return null;
|
|
4302
4362
|
let i = null;
|
|
4303
|
-
for (let e =
|
|
4363
|
+
for (let e = r - 1; e >= 0; --e) {
|
|
4304
4364
|
let n = t[e];
|
|
4305
4365
|
if (n !== void 0 && H.isLineRow(n)) {
|
|
4306
4366
|
i = n.id;
|
|
4307
4367
|
break;
|
|
4308
4368
|
}
|
|
4309
4369
|
}
|
|
4310
|
-
return
|
|
4370
|
+
return n.mutations.deleteLine(e), i;
|
|
4311
4371
|
}
|
|
4312
|
-
let
|
|
4313
|
-
isEditable:
|
|
4372
|
+
let S = yi({
|
|
4373
|
+
isEditable: n.isEditable,
|
|
4314
4374
|
addLineBelow: x,
|
|
4315
|
-
deleteEmptyLine:
|
|
4316
|
-
duplicateLine: (e) =>
|
|
4317
|
-
tbodyRef:
|
|
4318
|
-
}),
|
|
4319
|
-
mt(
|
|
4320
|
-
|
|
4375
|
+
deleteEmptyLine: te,
|
|
4376
|
+
duplicateLine: (e) => n.mutations.duplicateLine(e),
|
|
4377
|
+
tbodyRef: u
|
|
4378
|
+
}), C = I(0);
|
|
4379
|
+
mt(v, async () => {
|
|
4380
|
+
C.value += 1, await Ze(), b();
|
|
4321
4381
|
}, { flush: "post" });
|
|
4322
|
-
let
|
|
4382
|
+
let ne = I(/* @__PURE__ */ new Set()), re = I(null), ie;
|
|
4323
4383
|
tt(() => {
|
|
4324
4384
|
ie !== void 0 && clearTimeout(ie);
|
|
4325
4385
|
});
|
|
@@ -4328,145 +4388,146 @@ var ps = { class: "relative" }, ms = { class: "border-b border-secondary bg-seco
|
|
|
4328
4388
|
}
|
|
4329
4389
|
let oe = D(() => {
|
|
4330
4390
|
let e = /* @__PURE__ */ new Map();
|
|
4331
|
-
for (let t of
|
|
4332
|
-
let
|
|
4333
|
-
e.set(t.line.groupId,
|
|
4391
|
+
for (let t of l.value) if (H.isLineRow(t.line) && t.line.groupId !== null && t.gross !== null) {
|
|
4392
|
+
let r = e.get(t.line.groupId) ?? 0, i = vr.getDisplayGrossLineTotal(n.meta.value.documentType, t.gross, t.line.isDiscount);
|
|
4393
|
+
e.set(t.line.groupId, r + i);
|
|
4334
4394
|
}
|
|
4335
4395
|
return e;
|
|
4336
|
-
}),
|
|
4396
|
+
}), se = D(() => l.value.filter((e) => {
|
|
4337
4397
|
if (!H.isLineRow(e.line)) return !0;
|
|
4338
4398
|
let { groupId: t } = e.line;
|
|
4339
|
-
return t === null || !
|
|
4340
|
-
})),
|
|
4341
|
-
function ce(e) {
|
|
4342
|
-
let t = new Set(S.value);
|
|
4343
|
-
t.has(e) ? (t.delete(e), fe(e)) : t.add(e), S.value = t;
|
|
4344
|
-
}
|
|
4399
|
+
return t === null || !ne.value.has(t);
|
|
4400
|
+
})), ce = D(() => `${a.value.reduce((e, t) => e + (t.widthInRem ?? t.minWidthInRem ?? 0), 0)}rem`);
|
|
4345
4401
|
function le(e) {
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
t.delete(e), S.value = t, fe(e);
|
|
4402
|
+
let t = new Set(ne.value);
|
|
4403
|
+
t.has(e) ? (t.delete(e), pe(e)) : t.add(e), ne.value = t;
|
|
4349
4404
|
}
|
|
4350
|
-
function ue() {
|
|
4351
|
-
|
|
4405
|
+
function ue(e) {
|
|
4406
|
+
if (!ne.value.has(e)) return;
|
|
4407
|
+
let t = new Set(ne.value);
|
|
4408
|
+
t.delete(e), ne.value = t, pe(e);
|
|
4352
4409
|
}
|
|
4353
|
-
function de(
|
|
4410
|
+
function de() {
|
|
4411
|
+
return n.rows.value.filter((e) => H.isLineRow(e));
|
|
4412
|
+
}
|
|
4413
|
+
function fe(e, t, n) {
|
|
4354
4414
|
let r = e.reduce((e, t) => Math.max(e, String(t).length), 0);
|
|
4355
4415
|
return Math.min(n, Math.max(t, 2.75 + r * .55));
|
|
4356
4416
|
}
|
|
4357
|
-
function
|
|
4417
|
+
function pe(e) {
|
|
4358
4418
|
re.value = e, ie !== void 0 && clearTimeout(ie), ie = setTimeout(() => {
|
|
4359
4419
|
re.value = null;
|
|
4360
4420
|
}, 260);
|
|
4361
4421
|
}
|
|
4362
|
-
function pe(e) {
|
|
4363
|
-
if (e >= C.value.length) return u.value.length;
|
|
4364
|
-
let t = C.value[e];
|
|
4365
|
-
if (t === void 0) return u.value.length;
|
|
4366
|
-
let n = u.value.findIndex((e) => e.line.id === t.line.id);
|
|
4367
|
-
return n === -1 ? u.value.length : n;
|
|
4368
|
-
}
|
|
4369
4422
|
function me(e) {
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4423
|
+
if (e >= se.value.length) return l.value.length;
|
|
4424
|
+
let t = se.value[e];
|
|
4425
|
+
if (t === void 0) return l.value.length;
|
|
4426
|
+
let n = l.value.findIndex((e) => e.line.id === t.line.id);
|
|
4427
|
+
return n === -1 ? l.value.length : n;
|
|
4428
|
+
}
|
|
4429
|
+
function he(e) {
|
|
4430
|
+
let t = se.value[e - 1]?.line;
|
|
4431
|
+
if (t !== void 0 && H.isGroupRow(t) && ne.value.has(t.id)) {
|
|
4432
|
+
let e = l.value.findIndex((e) => e.line.id === t.id);
|
|
4373
4433
|
if (e !== -1) return e + 1;
|
|
4374
4434
|
}
|
|
4375
|
-
return
|
|
4435
|
+
return me(e);
|
|
4376
4436
|
}
|
|
4377
|
-
function
|
|
4378
|
-
let t =
|
|
4437
|
+
function ge(e) {
|
|
4438
|
+
let t = me(e), n = l.value[t - 1]?.line, r = l.value[t]?.line;
|
|
4379
4439
|
return !(n !== void 0 && H.isGroupRow(n) || r !== void 0 && H.isLineRow(r) && r.groupId !== null);
|
|
4380
4440
|
}
|
|
4381
4441
|
async function _e(e) {
|
|
4382
4442
|
await Ze();
|
|
4383
|
-
let t =
|
|
4443
|
+
let t = u.value?.querySelector(`input[id="billing-document-line-items-name-${e}"]`);
|
|
4384
4444
|
t?.focus(), t?.select();
|
|
4385
4445
|
}
|
|
4386
|
-
function ve(e) {
|
|
4387
|
-
if (!r.isEditable.value) return;
|
|
4388
|
-
let t = r.mutations.addLine(me(e)), n = r.rows.value.find((e) => e.id === t);
|
|
4389
|
-
n !== void 0 && H.isLineRow(n) && n.groupId !== null && le(n.groupId), _e(t);
|
|
4390
|
-
}
|
|
4391
4446
|
function ye(e) {
|
|
4392
|
-
|
|
4447
|
+
if (!n.isEditable.value) return;
|
|
4448
|
+
let t = n.mutations.addLine(he(e)), r = n.rows.value.find((e) => e.id === t);
|
|
4449
|
+
r !== void 0 && H.isLineRow(r) && r.groupId !== null && ue(r.groupId), _e(t);
|
|
4393
4450
|
}
|
|
4394
|
-
|
|
4451
|
+
function be(e) {
|
|
4452
|
+
n.isEditable.value && ge(e) && n.mutations.addGroup(me(e));
|
|
4453
|
+
}
|
|
4454
|
+
return (e, r) => (F(), A("div", _s, [
|
|
4395
4455
|
j("div", {
|
|
4396
4456
|
ref_key: "scrollContainerRef",
|
|
4397
|
-
ref:
|
|
4398
|
-
class: Qe([R(
|
|
4457
|
+
ref: d,
|
|
4458
|
+
class: Qe([R(_) ? "select-none" : void 0, "overflow-x-auto overflow-y-hidden"]),
|
|
4399
4459
|
"data-test-id": "billing-document-line-items-scroll-container",
|
|
4400
|
-
onScroll:
|
|
4460
|
+
onScroll: h
|
|
4401
4461
|
}, [j("table", {
|
|
4402
4462
|
ref_key: "tableRef",
|
|
4403
|
-
ref:
|
|
4463
|
+
ref: f,
|
|
4404
4464
|
style: et({
|
|
4405
|
-
minWidth:
|
|
4465
|
+
minWidth: ce.value,
|
|
4406
4466
|
width: "100%"
|
|
4407
4467
|
}),
|
|
4408
4468
|
class: "table-fixed text-left"
|
|
4409
4469
|
}, [
|
|
4410
|
-
j("colgroup", null, [(F(!0), A(E, null, ot(
|
|
4470
|
+
j("colgroup", null, [(F(!0), A(E, null, ot(a.value, (e, t) => (F(), A("col", {
|
|
4411
4471
|
key: t,
|
|
4412
4472
|
style: et(e.widthInRem === void 0 ? {} : { width: `${e.widthInRem}rem` })
|
|
4413
4473
|
}, null, 4))), 128))]),
|
|
4414
|
-
j("thead", null, [j("tr",
|
|
4415
|
-
R(
|
|
4416
|
-
R(
|
|
4474
|
+
j("thead", null, [j("tr", vs, [
|
|
4475
|
+
R(n).isEditable.value ? (F(), A("th", ys)) : k("", !0),
|
|
4476
|
+
R(n).isEditable.value ? (F(), A("th", bs, [M(R(Ot), {
|
|
4417
4477
|
id: "billing-document-line-items-select-all",
|
|
4418
|
-
"model-value": R(
|
|
4419
|
-
"is-indeterminate": R(
|
|
4420
|
-
label: R(
|
|
4478
|
+
"model-value": R(n).selection.allSelected.value || R(n).selection.indeterminate.value,
|
|
4479
|
+
"is-indeterminate": R(n).selection.indeterminate.value,
|
|
4480
|
+
label: R(t).t("wise_invoicing.invoice.detail.line_items.item"),
|
|
4421
4481
|
"is-label-hidden": !0,
|
|
4422
|
-
"is-disabled": !R(
|
|
4423
|
-
"onUpdate:modelValue":
|
|
4482
|
+
"is-disabled": !R(n).isEditable.value,
|
|
4483
|
+
"onUpdate:modelValue": r[0] ||= (e) => R(n).selection.toggleAll()
|
|
4424
4484
|
}, null, 8, [
|
|
4425
4485
|
"model-value",
|
|
4426
4486
|
"is-indeterminate",
|
|
4427
4487
|
"label",
|
|
4428
4488
|
"is-disabled"
|
|
4429
4489
|
])])) : k("", !0),
|
|
4430
|
-
(F(!0), A(E, null, ot(
|
|
4490
|
+
(F(!0), A(E, null, ot(s.value, (e, t) => (F(), A("th", {
|
|
4431
4491
|
key: t,
|
|
4432
4492
|
class: Qe([e.align === "right" ? "text-right" : "text-left", "h-11 px-lg py-sm text-xs font-semibold text-tertiary"]),
|
|
4433
4493
|
scope: "col"
|
|
4434
4494
|
}, L(e.label), 3))), 128)),
|
|
4435
|
-
R(
|
|
4495
|
+
R(n).isEditable.value ? (F(), A("th", xs)) : k("", !0)
|
|
4436
4496
|
])]),
|
|
4437
4497
|
(F(), A("tbody", {
|
|
4438
|
-
key:
|
|
4498
|
+
key: C.value,
|
|
4439
4499
|
ref_key: "tbodyRef",
|
|
4440
|
-
ref:
|
|
4441
|
-
|
|
4500
|
+
ref: u,
|
|
4501
|
+
"data-drop-intent": R(y) ?? void 0,
|
|
4502
|
+
onKeydownCapture: r[3] ||= (...e) => R(S).onKeydown && R(S).onKeydown(...e)
|
|
4442
4503
|
}, [
|
|
4443
|
-
(F(!0), A(E, null, ot(
|
|
4444
|
-
colspan:
|
|
4504
|
+
(F(!0), A(E, null, ot(se.value, (e, r) => (F(), A(E, { key: e.line.id }, [R(n).isEditable.value ? ht((F(), A("tr", Cs, [j("td", {
|
|
4505
|
+
colspan: o.value,
|
|
4445
4506
|
class: "relative h-0 overflow-visible p-none"
|
|
4446
4507
|
}, [M(Tr, {
|
|
4447
|
-
"can-add-group":
|
|
4448
|
-
label: R(
|
|
4449
|
-
onAddLine: (e) =>
|
|
4450
|
-
onAddGroup: (e) =>
|
|
4508
|
+
"can-add-group": ge(r),
|
|
4509
|
+
label: R(t).t("wise_invoicing.invoice.detail.line_items.insert_line"),
|
|
4510
|
+
onAddLine: (e) => ye(r),
|
|
4511
|
+
onAddGroup: (e) => be(r)
|
|
4451
4512
|
}, null, 8, [
|
|
4452
4513
|
"can-add-group",
|
|
4453
4514
|
"label",
|
|
4454
4515
|
"onAddLine",
|
|
4455
4516
|
"onAddGroup"
|
|
4456
|
-
])], 8,
|
|
4517
|
+
])], 8, ws)], 512)), [[pt, !R(_)]]) : k("", !0), R(H).isGroupRow(e.line) ? (F(), O(Gr, {
|
|
4457
4518
|
key: 1,
|
|
4458
|
-
"content-column-span":
|
|
4519
|
+
"content-column-span": c.value,
|
|
4459
4520
|
group: e.line,
|
|
4460
|
-
"is-collapsed":
|
|
4521
|
+
"is-collapsed": ne.value.has(e.line.id),
|
|
4461
4522
|
total: oe.value.get(e.line.id) ?? null,
|
|
4462
|
-
onToggleCollapse: (t) =>
|
|
4523
|
+
onToggleCollapse: (t) => le(e.line.id)
|
|
4463
4524
|
}, null, 8, [
|
|
4464
4525
|
"content-column-span",
|
|
4465
4526
|
"group",
|
|
4466
4527
|
"is-collapsed",
|
|
4467
4528
|
"total",
|
|
4468
4529
|
"onToggleCollapse"
|
|
4469
|
-
])) : (F(), O(
|
|
4530
|
+
])) : (F(), O(pi, {
|
|
4470
4531
|
key: 2,
|
|
4471
4532
|
line: e.line,
|
|
4472
4533
|
net: e.net ?? 0,
|
|
@@ -4478,44 +4539,44 @@ var ps = { class: "relative" }, ms = { class: "border-b border-secondary bg-seco
|
|
|
4478
4539
|
"gross",
|
|
4479
4540
|
"is-appearing"
|
|
4480
4541
|
]))], 64))), 128)),
|
|
4481
|
-
|
|
4482
|
-
colspan:
|
|
4542
|
+
se.value.length > 0 && R(n).isEditable.value ? ht((F(), A("tr", Ts, [j("td", {
|
|
4543
|
+
colspan: o.value,
|
|
4483
4544
|
class: "relative h-5 overflow-visible p-none"
|
|
4484
4545
|
}, [M(Tr, {
|
|
4485
|
-
"can-add-group":
|
|
4486
|
-
label: R(
|
|
4546
|
+
"can-add-group": ge(se.value.length),
|
|
4547
|
+
label: R(t).t("wise_invoicing.invoice.detail.line_items.insert_line"),
|
|
4487
4548
|
placement: "end",
|
|
4488
|
-
onAddLine:
|
|
4489
|
-
onAddGroup:
|
|
4490
|
-
}, null, 8, ["can-add-group", "label"])], 8,
|
|
4491
|
-
|
|
4492
|
-
colspan:
|
|
4549
|
+
onAddLine: r[1] ||= (e) => ye(se.value.length),
|
|
4550
|
+
onAddGroup: r[2] ||= (e) => be(se.value.length)
|
|
4551
|
+
}, null, 8, ["can-add-group", "label"])], 8, Es)], 512)), [[pt, !R(_)]]) : k("", !0),
|
|
4552
|
+
se.value.length === 0 && !R(n).isEditable.value ? (F(), A("tr", Ds, [j("td", {
|
|
4553
|
+
colspan: o.value,
|
|
4493
4554
|
class: "px-lg py-xl text-center"
|
|
4494
4555
|
}, [M(R(V), {
|
|
4495
|
-
text: R(
|
|
4556
|
+
text: R(t).t("wise_invoicing.invoice.detail.line_items.empty"),
|
|
4496
4557
|
class: "text-sm text-tertiary"
|
|
4497
|
-
}, null, 8, ["text"])], 8,
|
|
4498
|
-
],
|
|
4558
|
+
}, null, 8, ["text"])], 8, Os)])) : k("", !0)
|
|
4559
|
+
], 40, Ss))
|
|
4499
4560
|
], 4)], 34),
|
|
4500
|
-
|
|
4561
|
+
p.value ? (F(), A("div", ks, [M(R(Yt), {
|
|
4501
4562
|
icon: R(De),
|
|
4502
|
-
label: R(
|
|
4563
|
+
label: R(t).t("wise_invoicing.invoice.detail.line_items.scroll_left"),
|
|
4503
4564
|
class: "pointer-events-auto shadow-md",
|
|
4504
4565
|
size: "sm",
|
|
4505
4566
|
variant: "secondary",
|
|
4506
|
-
onClick:
|
|
4567
|
+
onClick: r[4] ||= (e) => g(-1)
|
|
4507
4568
|
}, null, 8, ["icon", "label"])])) : k("", !0),
|
|
4508
|
-
|
|
4509
|
-
icon: R(
|
|
4510
|
-
label: R(
|
|
4569
|
+
m.value ? (F(), A("div", As, [M(R(Yt), {
|
|
4570
|
+
icon: R(ve),
|
|
4571
|
+
label: R(t).t("wise_invoicing.invoice.detail.line_items.scroll_right"),
|
|
4511
4572
|
class: "pointer-events-auto shadow-md",
|
|
4512
4573
|
size: "sm",
|
|
4513
4574
|
variant: "secondary",
|
|
4514
|
-
onClick:
|
|
4575
|
+
onClick: r[5] ||= (e) => g(1)
|
|
4515
4576
|
}, null, 8, ["icon", "label"])])) : k("", !0)
|
|
4516
4577
|
]));
|
|
4517
4578
|
}
|
|
4518
|
-
}),
|
|
4579
|
+
}), Ms = /* @__PURE__ */ N({
|
|
4519
4580
|
__name: "BillingDocumentLineItemsTableHeader",
|
|
4520
4581
|
props: { showApplyDiscount: {
|
|
4521
4582
|
type: Boolean,
|
|
@@ -4523,33 +4584,66 @@ var ps = { class: "relative" }, ms = { class: "border-b border-secondary bg-seco
|
|
|
4523
4584
|
} },
|
|
4524
4585
|
emits: ["applyDiscount"],
|
|
4525
4586
|
setup(e, { emit: t }) {
|
|
4526
|
-
let n = e, r = t, i = T(), a = ar()
|
|
4527
|
-
|
|
4587
|
+
let n = e, r = t, i = T(), a = ar(), o = D(() => a.isEditable.value ? a.hasInvalidRows.value && a.isDirty.value ? {
|
|
4588
|
+
isBlocking: !0,
|
|
4589
|
+
text: i.t("wise_invoicing.invoice.detail.line_items.save_blocked")
|
|
4590
|
+
} : a.saveState.value === "error" ? {
|
|
4591
|
+
isBlocking: !0,
|
|
4592
|
+
text: i.t("wise_invoicing.invoice.detail.line_items.save_failed")
|
|
4593
|
+
} : a.saveState.value === "saving" ? {
|
|
4594
|
+
isBlocking: !1,
|
|
4595
|
+
text: i.t("wise_invoicing.invoice.detail.line_items.saving")
|
|
4596
|
+
} : a.saveState.value === "dirty" ? {
|
|
4597
|
+
isBlocking: !1,
|
|
4598
|
+
text: i.t("wise_invoicing.invoice.detail.line_items.unsaved_changes")
|
|
4599
|
+
} : null : null);
|
|
4600
|
+
function s() {
|
|
4528
4601
|
r("applyDiscount");
|
|
4529
4602
|
}
|
|
4530
4603
|
return (e, t) => (F(), O(R(B), {
|
|
4531
4604
|
justify: "between",
|
|
4532
4605
|
class: "w-full gap-lg border-b border-secondary px-lg py-md"
|
|
4533
4606
|
}, {
|
|
4534
|
-
default: z(() => [M(R(
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4607
|
+
default: z(() => [M(R(B), {
|
|
4608
|
+
align: "center",
|
|
4609
|
+
class: "min-w-0 gap-md"
|
|
4610
|
+
}, {
|
|
4611
|
+
default: z(() => [M(R(V), {
|
|
4612
|
+
text: R(i).t("wise_invoicing.invoice.detail.line_items.title"),
|
|
4613
|
+
as: "h2",
|
|
4614
|
+
class: "shrink-0 text-sm font-semibold text-primary"
|
|
4615
|
+
}, null, 8, ["text"]), o.value === null ? k("", !0) : (F(), O(R(B), {
|
|
4616
|
+
key: 0,
|
|
4617
|
+
class: Qe([o.value.isBlocking ? "text-error-primary" : "text-tertiary", "min-w-0 gap-xs"]),
|
|
4618
|
+
align: "center",
|
|
4619
|
+
"aria-live": "polite",
|
|
4620
|
+
"data-test-id": "billing-document-line-items-save-status"
|
|
4621
|
+
}, {
|
|
4622
|
+
default: z(() => [o.value.isBlocking ? (F(), O(R(oe), {
|
|
4623
|
+
key: 0,
|
|
4624
|
+
class: "size-4 shrink-0"
|
|
4625
|
+
})) : k("", !0), M(R(V), {
|
|
4626
|
+
text: o.value.text,
|
|
4627
|
+
class: "min-w-0 truncate text-xs"
|
|
4628
|
+
}, null, 8, ["text"])]),
|
|
4629
|
+
_: 1
|
|
4630
|
+
}, 8, ["class"]))]),
|
|
4631
|
+
_: 1
|
|
4632
|
+
}), M(R(B), { class: "shrink-0 gap-sm" }, {
|
|
4539
4633
|
default: z(() => [n.showApplyDiscount ? (F(), O(R(Dt), {
|
|
4540
4634
|
key: 0,
|
|
4541
4635
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
|
|
4542
4636
|
"icon-left": R(Ce),
|
|
4543
4637
|
"is-disabled": !R(a).isEditable.value,
|
|
4544
4638
|
variant: "secondary",
|
|
4545
|
-
onClick:
|
|
4639
|
+
onClick: s
|
|
4546
4640
|
}, null, 8, [
|
|
4547
4641
|
"label",
|
|
4548
4642
|
"icon-left",
|
|
4549
4643
|
"is-disabled"
|
|
4550
4644
|
])) : k("", !0), M(R(Dt), {
|
|
4551
4645
|
label: R(i).t("wise_invoicing.invoice.detail.line_items.add_item"),
|
|
4552
|
-
"icon-left": R(
|
|
4646
|
+
"icon-left": R(C),
|
|
4553
4647
|
"is-disabled": !R(a).isEditable.value,
|
|
4554
4648
|
onClick: t[0] ||= (e) => R(a).mutations.addLineAtEnd()
|
|
4555
4649
|
}, null, 8, [
|
|
@@ -4562,15 +4656,15 @@ var ps = { class: "relative" }, ms = { class: "border-b border-secondary bg-seco
|
|
|
4562
4656
|
_: 1
|
|
4563
4657
|
}));
|
|
4564
4658
|
}
|
|
4565
|
-
}),
|
|
4566
|
-
function
|
|
4567
|
-
return F(), A("section",
|
|
4659
|
+
}), Ns = {}, Ps = { class: "relative w-full rounded-lg border border-secondary bg-primary shadow-sm" };
|
|
4660
|
+
function Fs(e, t) {
|
|
4661
|
+
return F(), A("section", Ps, [st(e.$slots, "default")]);
|
|
4568
4662
|
}
|
|
4569
|
-
var
|
|
4663
|
+
var Is = /*#__PURE__*/ Pe(Ns, [["render", Fs]]), Ls = /* @__PURE__ */ N({
|
|
4570
4664
|
__name: "BillingDocumentLineItemsTotals",
|
|
4571
4665
|
props: { billingDocument: {} },
|
|
4572
4666
|
setup(e) {
|
|
4573
|
-
let t = e, n = T(), r =
|
|
4667
|
+
let t = e, n = T(), r = _();
|
|
4574
4668
|
function i(e) {
|
|
4575
4669
|
return r.formatMonetary(vr.getDisplayMonetary(t.billingDocument.type, e));
|
|
4576
4670
|
}
|
|
@@ -4584,10 +4678,10 @@ var js = /*#__PURE__*/ Pe(Os, [["render", As]]), Ms = /* @__PURE__ */ N({
|
|
|
4584
4678
|
label: n.t("wise_invoicing.invoice.detail.line_items.total"),
|
|
4585
4679
|
net: i(t.billingDocument.effectiveNet),
|
|
4586
4680
|
vat: i(t.billingDocument.vatAmount)
|
|
4587
|
-
}]), o = D(() => t.billingDocument.type ===
|
|
4681
|
+
}]), o = D(() => t.billingDocument.type === s.STANDARD), c = D(() => {
|
|
4588
4682
|
if (t.billingDocument.totalDiscountAmount === null) return "-";
|
|
4589
4683
|
let e = i(t.billingDocument.totalDiscountAmount);
|
|
4590
|
-
return t.billingDocument.type ===
|
|
4684
|
+
return t.billingDocument.type === s.STANDARD ? `-${e}` : e;
|
|
4591
4685
|
}), l = D(() => n.t("wise_invoicing.invoice.detail.totals.vat_rounding_tooltip"));
|
|
4592
4686
|
return (e, r) => (F(), O(R(B), {
|
|
4593
4687
|
align: "end",
|
|
@@ -4661,7 +4755,7 @@ var js = /*#__PURE__*/ Pe(Os, [["render", As]]), Ms = /* @__PURE__ */ N({
|
|
|
4661
4755
|
}, {
|
|
4662
4756
|
default: z(() => [M(R(Yt), {
|
|
4663
4757
|
label: R(n).t("wise_invoicing.invoice.detail.totals.info"),
|
|
4664
|
-
icon: R(
|
|
4758
|
+
icon: R(de),
|
|
4665
4759
|
class: "rounded-full!",
|
|
4666
4760
|
variant: "tertiary"
|
|
4667
4761
|
}, null, 8, ["label", "icon"])]),
|
|
@@ -4701,7 +4795,7 @@ var js = /*#__PURE__*/ Pe(Os, [["render", As]]), Ms = /* @__PURE__ */ N({
|
|
|
4701
4795
|
class: "text-xs font-medium text-secondary",
|
|
4702
4796
|
"disable-tooltip": ""
|
|
4703
4797
|
}, null, 8, ["text"]), M(R(V), {
|
|
4704
|
-
text:
|
|
4798
|
+
text: c.value,
|
|
4705
4799
|
as: "div",
|
|
4706
4800
|
class: "text-sm font-medium whitespace-nowrap text-primary",
|
|
4707
4801
|
"disable-tooltip": ""
|
|
@@ -4743,7 +4837,7 @@ var js = /*#__PURE__*/ Pe(Os, [["render", As]]), Ms = /* @__PURE__ */ N({
|
|
|
4743
4837
|
});
|
|
4744
4838
|
//#endregion
|
|
4745
4839
|
//#region src/ui/billing-document/table/composables/useBillingDocumentLineItemsAutoSave.composable.ts
|
|
4746
|
-
function
|
|
4840
|
+
function Rs(e) {
|
|
4747
4841
|
let { hasInvalidRows: t, hasSaveError: n, isDirty: r, isEditable: i, isSaving: a, baselineRowsKey: o, rows: s, rowsKey: c, updateLines: l, meta: u } = e, d = null, f = null, p = D(() => a.value ? "saving" : n.value ? "error" : r.value ? "dirty" : "saved");
|
|
4748
4842
|
async function m() {
|
|
4749
4843
|
if (!i.value || t.value || !r.value) return;
|
|
@@ -4774,17 +4868,13 @@ function Ns(e) {
|
|
|
4774
4868
|
}
|
|
4775
4869
|
//#endregion
|
|
4776
4870
|
//#region src/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.ts
|
|
4777
|
-
function
|
|
4871
|
+
function zs(e, t) {
|
|
4778
4872
|
return Number.isFinite(e) ? e : t;
|
|
4779
4873
|
}
|
|
4780
|
-
function
|
|
4781
|
-
return e === null || e === 0 ? null : new
|
|
4782
|
-
}
|
|
4783
|
-
function Is(e, t) {
|
|
4784
|
-
let n = e[t - 1], r = e[t];
|
|
4785
|
-
return n !== void 0 && H.isGroupRow(n) ? n.id : n !== void 0 && H.isLineRow(n) && n.groupId !== null && (r === void 0 || H.isGroupRow(r) || r.groupId === n.groupId) ? n.groupId : r !== void 0 && H.isLineRow(r) && r.groupId !== null ? r.groupId : null;
|
|
4874
|
+
function Bs(e) {
|
|
4875
|
+
return e === null || e === 0 ? null : new x(e);
|
|
4786
4876
|
}
|
|
4787
|
-
function
|
|
4877
|
+
function Vs(e) {
|
|
4788
4878
|
let { hasSaveError: t, isEditable: n, baselineRowsKey: r, billingDocument: i, rows: a, selection: o, meta: s } = e;
|
|
4789
4879
|
function c(e = { clearSelection: !1 }) {
|
|
4790
4880
|
let s = H.createBillingDocumentLineItemDisplayRows(i(), n.value);
|
|
@@ -4810,15 +4900,15 @@ function Ls(e) {
|
|
|
4810
4900
|
...e,
|
|
4811
4901
|
name: t.name,
|
|
4812
4902
|
description: t.description,
|
|
4813
|
-
discountPercentage:
|
|
4814
|
-
quantity:
|
|
4903
|
+
discountPercentage: Bs(t.discountPercentage),
|
|
4904
|
+
quantity: zs(t.quantity, e.quantity),
|
|
4815
4905
|
unit: t.unit,
|
|
4816
|
-
unitPrice: Math.max(0,
|
|
4906
|
+
unitPrice: Math.max(0, zs(t.unitPrice, e.unitPrice)),
|
|
4817
4907
|
vatRate: t.vatRate
|
|
4818
4908
|
}));
|
|
4819
4909
|
}
|
|
4820
4910
|
function p(e) {
|
|
4821
|
-
let t =
|
|
4911
|
+
let t = H.resolveInsertGroupId(a.value, e), n = H.createNewBillingDocumentLineItemRow(s.value, t);
|
|
4822
4912
|
return a.value.splice(e, 0, n), o.syncSelection(), n.id;
|
|
4823
4913
|
}
|
|
4824
4914
|
function m() {
|
|
@@ -4864,24 +4954,24 @@ function Ls(e) {
|
|
|
4864
4954
|
function te(e) {
|
|
4865
4955
|
o.selectedIds.value.length !== 0 && (a.value = H.setVatRateForSelectedRows(a.value, new Set(o.selectedIds.value), e));
|
|
4866
4956
|
}
|
|
4867
|
-
function
|
|
4957
|
+
function S(e) {
|
|
4868
4958
|
o.selectedIds.value.length !== 0 && (a.value = H.setUnitForSelectedRows(a.value, new Set(o.selectedIds.value), e));
|
|
4869
4959
|
}
|
|
4870
|
-
function
|
|
4960
|
+
function C(e, t, n = null) {
|
|
4871
4961
|
if (e === t) return;
|
|
4872
|
-
let
|
|
4873
|
-
if (
|
|
4874
|
-
if (H.isGroupRow(
|
|
4962
|
+
let r = a.value.slice(), i = r[e];
|
|
4963
|
+
if (i === void 0) return;
|
|
4964
|
+
if (H.isGroupRow(i)) {
|
|
4875
4965
|
a.value = H.moveGroupBlockByIndex(a.value, e, t), o.syncSelection();
|
|
4876
4966
|
return;
|
|
4877
4967
|
}
|
|
4878
|
-
let [
|
|
4879
|
-
if (
|
|
4880
|
-
let
|
|
4881
|
-
|
|
4882
|
-
...
|
|
4883
|
-
groupId:
|
|
4884
|
-
}), a.value =
|
|
4968
|
+
let [s] = r.splice(e, 1);
|
|
4969
|
+
if (s === void 0 || !H.isLineRow(s)) return;
|
|
4970
|
+
let c = Math.max(0, Math.min(t, r.length)), l = n ?? (s.groupId === null ? "root" : "group");
|
|
4971
|
+
r.splice(c, 0, {
|
|
4972
|
+
...s,
|
|
4973
|
+
groupId: H.resolveInsertGroupId(r, c, l)
|
|
4974
|
+
}), a.value = r, o.syncSelection();
|
|
4885
4975
|
}
|
|
4886
4976
|
return {
|
|
4887
4977
|
addGroup: h,
|
|
@@ -4894,10 +4984,10 @@ function Ls(e) {
|
|
|
4894
4984
|
duplicateLine: v,
|
|
4895
4985
|
duplicateSelectedLines: x,
|
|
4896
4986
|
groupSelectedLines: b,
|
|
4897
|
-
moveLineByIndex:
|
|
4987
|
+
moveLineByIndex: C,
|
|
4898
4988
|
moveSelectedLinesToGroup: ee,
|
|
4899
4989
|
resetToServer: l,
|
|
4900
|
-
setUnitForSelectedLines:
|
|
4990
|
+
setUnitForSelectedLines: S,
|
|
4901
4991
|
setVatRateForSelectedLines: te,
|
|
4902
4992
|
updateAllFields: f,
|
|
4903
4993
|
updateGroup: d
|
|
@@ -4905,7 +4995,7 @@ function Ls(e) {
|
|
|
4905
4995
|
}
|
|
4906
4996
|
//#endregion
|
|
4907
4997
|
//#region src/ui/billing-document/table/composables/useBillingDocumentLineItemsSelection.composable.ts
|
|
4908
|
-
function
|
|
4998
|
+
function Hs(e) {
|
|
4909
4999
|
let t = I([]), n = D(() => e.rows().filter(H.isLineRow)), r = D(() => {
|
|
4910
5000
|
let e = n.value;
|
|
4911
5001
|
return e.length > 0 && t.value.length === e.length;
|
|
@@ -4951,8 +5041,8 @@ function Rs(e) {
|
|
|
4951
5041
|
}
|
|
4952
5042
|
//#endregion
|
|
4953
5043
|
//#region src/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.ts
|
|
4954
|
-
function
|
|
4955
|
-
let t = I([]), n = I(""), r = I(!1), i = D(() => e.customFieldDefinitions?.() ?? []), a = D(() => Ae.filterByEntityType(i.value,
|
|
5044
|
+
function Us(e) {
|
|
5045
|
+
let t = I([]), n = I(""), r = I(!1), i = D(() => e.customFieldDefinitions?.() ?? []), a = D(() => Ae.filterByEntityType(i.value, f.INVOICE_LINE)), o = D(() => Ae.filterByEntityType(i.value, f.INVOICE_LINE_GROUP)), s = D(() => H.createBillingDocumentLineItemsMeta(e.billingDocument())), l = D(() => e.canEdit === void 0 ? e.billingDocument().status === c.DRAFT || e.billingDocument().status === c.READY : e.canEdit.value), u = D(() => H.createBillingDocumentLineItemRowsKey(t.value)), d = D(() => u.value !== n.value), p = D(() => t.value.some((e) => !H.isTransientEmptyLineRow(e) && !H.isBillingDocumentLineItemRowValid(e))), m = D(() => H.createBillingDocumentLineItemsServerSnapshot(e.billingDocument())), h = Hs({ rows: () => t.value }), g = D(() => t.value.map((e) => {
|
|
4956
5046
|
if (H.isGroupRow(e)) return {
|
|
4957
5047
|
discount: null,
|
|
4958
5048
|
gross: null,
|
|
@@ -4968,31 +5058,31 @@ function zs(e) {
|
|
|
4968
5058
|
net: r,
|
|
4969
5059
|
vat: i
|
|
4970
5060
|
};
|
|
4971
|
-
})), _ =
|
|
5061
|
+
})), _ = Vs({
|
|
4972
5062
|
hasSaveError: r,
|
|
4973
|
-
isEditable:
|
|
5063
|
+
isEditable: l,
|
|
4974
5064
|
baselineRowsKey: n,
|
|
4975
5065
|
billingDocument: e.billingDocument,
|
|
4976
5066
|
rows: t,
|
|
4977
5067
|
selection: h,
|
|
4978
5068
|
meta: s
|
|
4979
|
-
}), v =
|
|
4980
|
-
hasInvalidRows:
|
|
5069
|
+
}), v = Rs({
|
|
5070
|
+
hasInvalidRows: p,
|
|
4981
5071
|
hasSaveError: r,
|
|
4982
|
-
isDirty:
|
|
4983
|
-
isEditable:
|
|
5072
|
+
isDirty: d,
|
|
5073
|
+
isEditable: l,
|
|
4984
5074
|
isSaving: e.isSaving,
|
|
4985
5075
|
baselineRowsKey: n,
|
|
4986
5076
|
rows: t,
|
|
4987
|
-
rowsKey:
|
|
5077
|
+
rowsKey: u,
|
|
4988
5078
|
updateLines: e.updateLines,
|
|
4989
5079
|
meta: s
|
|
4990
5080
|
});
|
|
4991
5081
|
return mt(m, () => _.applyServerRows(), { immediate: !0 }), {
|
|
4992
|
-
hasInvalidRows:
|
|
5082
|
+
hasInvalidRows: p,
|
|
4993
5083
|
hasSaveError: r,
|
|
4994
|
-
isDirty:
|
|
4995
|
-
isEditable:
|
|
5084
|
+
isDirty: d,
|
|
5085
|
+
isEditable: l,
|
|
4996
5086
|
isSaving: v.isSaving,
|
|
4997
5087
|
customFieldDefinitions: i,
|
|
4998
5088
|
displayRows: g,
|
|
@@ -5008,7 +5098,7 @@ function zs(e) {
|
|
|
5008
5098
|
}
|
|
5009
5099
|
//#endregion
|
|
5010
5100
|
//#region src/ui/billing-document/BillingDocumentDetailLayout.vue
|
|
5011
|
-
var
|
|
5101
|
+
var Ws = /* @__PURE__ */ N({
|
|
5012
5102
|
__name: "BillingDocumentDetailLayout",
|
|
5013
5103
|
props: {
|
|
5014
5104
|
title: {},
|
|
@@ -5041,7 +5131,7 @@ var Bs = /* @__PURE__ */ N({
|
|
|
5041
5131
|
_: 3
|
|
5042
5132
|
}, 8, ["breadcrumbs", "title"]));
|
|
5043
5133
|
}
|
|
5044
|
-
}),
|
|
5134
|
+
}), Gs = /* @__PURE__ */ N({
|
|
5045
5135
|
__name: "BillingDocumentDetailPage",
|
|
5046
5136
|
props: {
|
|
5047
5137
|
title: {},
|
|
@@ -5049,8 +5139,8 @@ var Bs = /* @__PURE__ */ N({
|
|
|
5049
5139
|
breadcrumbs: {}
|
|
5050
5140
|
},
|
|
5051
5141
|
setup(e) {
|
|
5052
|
-
let t = e, n =
|
|
5053
|
-
return ze(D(() => [])), n.set(() => t.billingDocument.subject ?? t.billingDocument.sequence ?? t.title), (e, n) => (F(), O(
|
|
5142
|
+
let t = e, n = h();
|
|
5143
|
+
return ze(D(() => [])), n.set(() => t.billingDocument.subject ?? t.billingDocument.sequence ?? t.title), (e, n) => (F(), O(Ws, {
|
|
5054
5144
|
breadcrumbs: t.breadcrumbs,
|
|
5055
5145
|
title: t.title
|
|
5056
5146
|
}, {
|
|
@@ -5063,8 +5153,8 @@ var Bs = /* @__PURE__ */ N({
|
|
|
5063
5153
|
});
|
|
5064
5154
|
//#endregion
|
|
5065
5155
|
//#region src/ui/billing-document/billingDocumentPdfPreviewRoute.util.ts
|
|
5066
|
-
function
|
|
5067
|
-
return e.type ===
|
|
5156
|
+
function Ks(e) {
|
|
5157
|
+
return e.type === s.CREDIT_NOTE ? {
|
|
5068
5158
|
name: "invoicing-credit-note-pdf-preview",
|
|
5069
5159
|
params: { creditNoteUuid: e.uuid }
|
|
5070
5160
|
} : {
|
|
@@ -5074,19 +5164,19 @@ function Hs(e) {
|
|
|
5074
5164
|
}
|
|
5075
5165
|
//#endregion
|
|
5076
5166
|
//#region src/ui/billing-document/BillingDocumentPdfViewer.vue?vue&type=script&setup=true&lang.ts
|
|
5077
|
-
var
|
|
5167
|
+
var qs = { class: "text-sm font-semibold text-primary" }, Js = { class: "w-10 text-xs text-primary" }, Ys = { class: "text-xs text-secondary" }, Xs = 25, Zs = 200, Qs = 10, $s = /* @__PURE__ */ N({
|
|
5078
5168
|
__name: "BillingDocumentPdfViewer",
|
|
5079
5169
|
props: { billingDocument: {} },
|
|
5080
5170
|
setup(e) {
|
|
5081
|
-
let t = e, n = T(), r = Ve(), i = I(75), a = I(1), o = I(null),
|
|
5082
|
-
let e = t.billingDocument.externalRemarks !== null && t.billingDocument.externalRemarks.trim() !== "", n = Le.buildRows(t.billingDocument, { isCreditNote: t.billingDocument.type ===
|
|
5171
|
+
let t = e, n = T(), r = Ve(), i = I(75), a = I(1), o = I(null), c = D(() => {
|
|
5172
|
+
let e = t.billingDocument.externalRemarks !== null && t.billingDocument.externalRemarks.trim() !== "", n = Le.buildRows(t.billingDocument, { isCreditNote: t.billingDocument.type === s.CREDIT_NOTE });
|
|
5083
5173
|
return Le.paginateRows(n, { hasRemarks: e }).length;
|
|
5084
|
-
}), l = D(() => t.billingDocument.type ===
|
|
5174
|
+
}), l = D(() => t.billingDocument.type === s.CREDIT_NOTE ? n.t("wise_invoicing.common.credit_note_pdf") : n.t("wise_invoicing.common.invoice_pdf"));
|
|
5085
5175
|
function u() {
|
|
5086
|
-
i.value = Math.min(
|
|
5176
|
+
i.value = Math.min(Zs, i.value + Qs);
|
|
5087
5177
|
}
|
|
5088
5178
|
function d() {
|
|
5089
|
-
i.value = Math.max(
|
|
5179
|
+
i.value = Math.max(Xs, i.value - Qs);
|
|
5090
5180
|
}
|
|
5091
5181
|
function f() {
|
|
5092
5182
|
return Array.from(o.value?.querySelectorAll("article") ?? []);
|
|
@@ -5102,10 +5192,10 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5102
5192
|
a.value > 1 && p(a.value - 1);
|
|
5103
5193
|
}
|
|
5104
5194
|
function h() {
|
|
5105
|
-
a.value <
|
|
5195
|
+
a.value < c.value && p(a.value + 1);
|
|
5106
5196
|
}
|
|
5107
5197
|
function g() {
|
|
5108
|
-
let e = r.resolve(
|
|
5198
|
+
let e = r.resolve(Ks(t.billingDocument));
|
|
5109
5199
|
window.open(e.href, "_blank", "noopener,noreferrer");
|
|
5110
5200
|
}
|
|
5111
5201
|
let _ = null;
|
|
@@ -5139,8 +5229,8 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5139
5229
|
justify: "between",
|
|
5140
5230
|
class: "w-full border-b border-secondary bg-primary px-lg py-md"
|
|
5141
5231
|
}, {
|
|
5142
|
-
default: z(() => [j("p",
|
|
5143
|
-
icon: R(
|
|
5232
|
+
default: z(() => [j("p", qs, L(l.value), 1), M(R(Yt), {
|
|
5233
|
+
icon: R(ye),
|
|
5144
5234
|
label: R(n).t("wise_invoicing.common.pdf_viewer.expand"),
|
|
5145
5235
|
variant: "tertiary",
|
|
5146
5236
|
onClick: g
|
|
@@ -5173,8 +5263,8 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5173
5263
|
"label"
|
|
5174
5264
|
]),
|
|
5175
5265
|
M(R(Yt), {
|
|
5176
|
-
disabled: a.value >=
|
|
5177
|
-
icon: R(
|
|
5266
|
+
disabled: a.value >= c.value,
|
|
5267
|
+
icon: R(fe),
|
|
5178
5268
|
label: R(n).t("wise_invoicing.common.pdf_viewer.next_page"),
|
|
5179
5269
|
size: "sm",
|
|
5180
5270
|
variant: "tertiary",
|
|
@@ -5184,15 +5274,15 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5184
5274
|
"icon",
|
|
5185
5275
|
"label"
|
|
5186
5276
|
]),
|
|
5187
|
-
j("p",
|
|
5277
|
+
j("p", Js, L(a.value) + " / " + L(c.value), 1)
|
|
5188
5278
|
]),
|
|
5189
5279
|
_: 1
|
|
5190
5280
|
}), M(R(B), { gap: "xs" }, {
|
|
5191
5281
|
default: z(() => [
|
|
5192
|
-
j("p",
|
|
5282
|
+
j("p", Ys, L(i.value) + "% ", 1),
|
|
5193
5283
|
M(R(Yt), {
|
|
5194
|
-
"is-disabled": i.value >=
|
|
5195
|
-
icon: R(
|
|
5284
|
+
"is-disabled": i.value >= Zs,
|
|
5285
|
+
icon: R(ne),
|
|
5196
5286
|
label: R(n).t("wise_invoicing.common.pdf_viewer.zoom_in"),
|
|
5197
5287
|
size: "sm",
|
|
5198
5288
|
variant: "tertiary",
|
|
@@ -5203,8 +5293,8 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5203
5293
|
"label"
|
|
5204
5294
|
]),
|
|
5205
5295
|
M(R(Yt), {
|
|
5206
|
-
"is-disabled": i.value <=
|
|
5207
|
-
icon: R(
|
|
5296
|
+
"is-disabled": i.value <= Xs,
|
|
5297
|
+
icon: R(ae),
|
|
5208
5298
|
label: R(n).t("wise_invoicing.common.pdf_viewer.zoom_out"),
|
|
5209
5299
|
variant: "tertiary",
|
|
5210
5300
|
onClick: d
|
|
@@ -5222,7 +5312,7 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5222
5312
|
_: 1
|
|
5223
5313
|
}));
|
|
5224
5314
|
}
|
|
5225
|
-
}),
|
|
5315
|
+
}), ec = /* @__PURE__ */ N({
|
|
5226
5316
|
__name: "BillingDocumentDetailViewDataProvider",
|
|
5227
5317
|
props: {
|
|
5228
5318
|
customFieldDefinitionsQuery: {},
|
|
@@ -5245,4 +5335,4 @@ var Us = { class: "text-sm font-semibold text-primary" }, Ws = { class: "w-10 te
|
|
|
5245
5335
|
}
|
|
5246
5336
|
});
|
|
5247
5337
|
//#endregion
|
|
5248
|
-
export { Cn as C, Tn as S, bn as T, jn as _,
|
|
5338
|
+
export { Cn as C, Tn as S, bn as T, jn as _, Ls as a, Dn as b, js as c, _r as d, ir as f, Ln as g, Rn as h, Us as i, Xr as l, zn as m, $s as n, Is as o, nr as p, Gs as r, Ms as s, ec as t, Jr as u, An as v, xn as w, En as x, kn as y };
|