@tesouro/embedded-components-react 0.11.100 → 0.11.102
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/experimental/QuickViewWidget.d.ts +62 -2
- package/dist/experimental/index.d.ts +62 -2
- package/dist/index.css +21 -17
- package/dist/index.d.ts +10 -6
- package/dist/lib/CardDetailsWidget.d.ts +6 -4
- package/dist/lib/CreditCardsWidget.d.ts +6 -4
- package/dist/lib/DebitCardsWidget.d.ts +6 -4
- package/dist/lib/SettingsWidget.d.ts +2 -1
- package/dist/lib/WidgetSuite.d.ts +8 -5
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +199 -168
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +44 -43
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +25 -284
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +291 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +28 -17
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +21 -34
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +71 -78
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +71 -77
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +43 -49
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/accounts/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +98 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +80 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/labels.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +17 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/testIds.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/analytics/events.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index2.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js +57 -44
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +98 -91
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +24 -21
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +87 -81
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +63 -44
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +302 -276
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +27 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsSectionContent.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +39 -37
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +39 -35
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +59 -61
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -103
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +97 -97
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +166 -154
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +12 -12
- package/dist/packages/shared-ui-shadcn/dist/index.js +18 -15
- package/package.json +1 -1
|
@@ -68,36 +68,42 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
|
|
|
68
68
|
{
|
|
69
69
|
id: s.Team,
|
|
70
70
|
label: z.teamSection,
|
|
71
|
-
content: re ?? /* @__PURE__ */ C(m, {
|
|
71
|
+
content: re ?? ((e) => /* @__PURE__ */ C(m, {
|
|
72
|
+
headerActionContainer: e,
|
|
72
73
|
acceptInviteRedirectUri: u,
|
|
73
74
|
initialView: K ? void 0 : E
|
|
74
|
-
})
|
|
75
|
+
}))
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
id: s.Invoice,
|
|
78
79
|
label: z.invoiceSection,
|
|
79
|
-
content: L ?? /* @__PURE__ */ C(f, {
|
|
80
|
+
content: L ?? ((e) => /* @__PURE__ */ C(f, {
|
|
81
|
+
headerActionContainer: e,
|
|
82
|
+
ref: B
|
|
83
|
+
}))
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
id: s.Expense,
|
|
83
87
|
label: z.expenseSection,
|
|
84
|
-
content: F ?? /* @__PURE__ */ C(d, {
|
|
88
|
+
content: F ?? ((e) => /* @__PURE__ */ C(d, {
|
|
89
|
+
headerActionContainer: e,
|
|
85
90
|
approvalsLabel: z.expenseApprovalsTab,
|
|
86
91
|
requirementsLabel: z.expenseRequirementsTab
|
|
87
|
-
})
|
|
92
|
+
}))
|
|
88
93
|
},
|
|
89
94
|
{
|
|
90
95
|
id: s.BillPay,
|
|
91
96
|
label: z.billPaySection,
|
|
92
|
-
content: N ?? /* @__PURE__ */ C(a, {
|
|
97
|
+
content: N ?? ((e) => /* @__PURE__ */ C(a, {
|
|
98
|
+
headerActionContainer: e,
|
|
93
99
|
showHeaderTitle: !1,
|
|
94
100
|
componentLabels: { header: { Description: z.billPayDescription } }
|
|
95
|
-
})
|
|
101
|
+
}))
|
|
96
102
|
},
|
|
97
103
|
{
|
|
98
104
|
id: s.Accounting,
|
|
99
105
|
label: z.accountingSection,
|
|
100
|
-
content: I ?? /* @__PURE__ */ C(g, {})
|
|
106
|
+
content: I ?? ((e) => /* @__PURE__ */ C(g, { headerActionContainer: e }))
|
|
101
107
|
},
|
|
102
108
|
{
|
|
103
109
|
id: s.Legal,
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js
CHANGED
|
@@ -17,7 +17,7 @@ function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
|
|
|
17
17
|
children: [u.map((a) => /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
|
|
18
18
|
variant: "section",
|
|
19
19
|
level: 3,
|
|
20
|
-
className: "ttw:mb-
|
|
20
|
+
className: "ttw:mb-4",
|
|
21
21
|
children: a.title
|
|
22
22
|
}), /* @__PURE__ */ s(e, {
|
|
23
23
|
type: "single",
|
|
@@ -31,7 +31,7 @@ function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
|
|
|
31
31
|
})] }, a.title)), f && d && /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
|
|
32
32
|
variant: "section",
|
|
33
33
|
level: 3,
|
|
34
|
-
className: "ttw:mb-
|
|
34
|
+
className: "ttw:mb-4",
|
|
35
35
|
children: m.contactUsTitle
|
|
36
36
|
}), /* @__PURE__ */ c("p", {
|
|
37
37
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
@@ -26,101 +26,107 @@ import { useLogoUpload as g } from "./index8.js";
|
|
|
26
26
|
import { useEffect as _, useImperativeHandle as v, useMemo as y, useRef as b } from "react";
|
|
27
27
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
28
28
|
// ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js
|
|
29
|
-
function w({
|
|
30
|
-
let
|
|
31
|
-
entityId:
|
|
32
|
-
entitySettings:
|
|
33
|
-
nextNumbers:
|
|
34
|
-
messageLabels:
|
|
35
|
-
}), { confirmLeave:
|
|
36
|
-
return _(() => (
|
|
37
|
-
|
|
38
|
-
}), [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
function w({ headerStart: e, headerActionContainer: t, entityId: n, entitySettings: r, nextNumbers: i, logo: a, confirmLeaveRef: o, panelLabels: s, numberingLabels: c, pdfLabels: l, discardLabels: h, messageLabels: g }) {
|
|
30
|
+
let v = u({
|
|
31
|
+
entityId: n,
|
|
32
|
+
entitySettings: r,
|
|
33
|
+
nextNumbers: i,
|
|
34
|
+
messageLabels: g
|
|
35
|
+
}), { confirmLeave: y } = v;
|
|
36
|
+
return _(() => (o.current = y, () => {
|
|
37
|
+
o.current = null;
|
|
38
|
+
}), [y, o]), /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(d, {
|
|
39
|
+
headerStart: e,
|
|
40
|
+
headerActionContainer: t,
|
|
41
|
+
logo: a,
|
|
42
|
+
onSubmit: v.submit,
|
|
43
|
+
submitDisabled: !v.isDirty || v.isSaving,
|
|
44
|
+
labels: s,
|
|
43
45
|
children: [/* @__PURE__ */ S(f, {
|
|
44
|
-
previewValue:
|
|
45
|
-
invoicePrefix:
|
|
46
|
-
startingNumber:
|
|
47
|
-
digitCount:
|
|
48
|
-
includeDate:
|
|
49
|
-
errors:
|
|
50
|
-
onInvoicePrefixChange:
|
|
51
|
-
onStartingNumberChange:
|
|
52
|
-
onDigitCountChange:
|
|
53
|
-
onIncludeDateChange:
|
|
54
|
-
labels:
|
|
46
|
+
previewValue: v.previewValue,
|
|
47
|
+
invoicePrefix: v.invoicePrefix,
|
|
48
|
+
startingNumber: v.startingNumber,
|
|
49
|
+
digitCount: v.digitCount,
|
|
50
|
+
includeDate: v.includeDate,
|
|
51
|
+
errors: v.numberingErrors,
|
|
52
|
+
onInvoicePrefixChange: v.onInvoicePrefixChange,
|
|
53
|
+
onStartingNumberChange: v.onStartingNumberChange,
|
|
54
|
+
onDigitCountChange: v.onDigitCountChange,
|
|
55
|
+
onIncludeDateChange: v.onIncludeDateChange,
|
|
56
|
+
labels: c
|
|
55
57
|
}), /* @__PURE__ */ S(p, {
|
|
56
|
-
displayBankDetails:
|
|
57
|
-
updatePaidInvoices:
|
|
58
|
-
onDisplayBankDetailsChange:
|
|
59
|
-
onUpdatePaidInvoicesChange:
|
|
60
|
-
labels:
|
|
58
|
+
displayBankDetails: v.displayBankDetails,
|
|
59
|
+
updatePaidInvoices: v.updatePaidInvoices,
|
|
60
|
+
onDisplayBankDetailsChange: v.onDisplayBankDetailsChange,
|
|
61
|
+
onUpdatePaidInvoicesChange: v.onUpdatePaidInvoicesChange,
|
|
62
|
+
labels: l
|
|
61
63
|
})]
|
|
62
64
|
}), /* @__PURE__ */ S(m, {
|
|
63
|
-
open:
|
|
64
|
-
onCancel:
|
|
65
|
-
onConfirm:
|
|
66
|
-
labels:
|
|
65
|
+
open: v.isDiscardDialogOpen,
|
|
66
|
+
onCancel: v.cancelDiscard,
|
|
67
|
+
onConfirm: v.confirmDiscard,
|
|
68
|
+
labels: h
|
|
67
69
|
})] });
|
|
68
70
|
}
|
|
69
|
-
function T({
|
|
70
|
-
let
|
|
71
|
-
v(
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
let { initResponse:
|
|
75
|
-
entityId:
|
|
76
|
-
labels:
|
|
77
|
-
}),
|
|
78
|
-
fileTypesHint:
|
|
79
|
-
...
|
|
80
|
-
}), [
|
|
81
|
-
if (!
|
|
82
|
-
let
|
|
71
|
+
function T({ headerStart: r, headerActionContainer: o, handleRef: u, panelLabels: f, logoLabels: p, dropzoneLabels: m, messageLabels: T, ...E }) {
|
|
72
|
+
let D = n(), O = b(null);
|
|
73
|
+
v(u, () => ({ confirmLeave: () => O.current?.() ?? Promise.resolve(!0) }), []), _(() => {
|
|
74
|
+
D(a.Mounted);
|
|
75
|
+
}, [D]);
|
|
76
|
+
let { initResponse: k } = i(), { canEdit: A } = y(() => s(k?.scopes), [k?.scopes]), { data: j, isLoading: M, isError: N, refetch: P } = e(), F = j?.id, I = A ? F : void 0, { data: L, isLoading: R, isError: z, refetch: B } = c(I), { data: V, isLoading: H, isError: U, refetch: W } = l(I), G = g({
|
|
77
|
+
entityId: F ?? "",
|
|
78
|
+
labels: T
|
|
79
|
+
}), K = y(() => ({
|
|
80
|
+
fileTypesHint: G.fileTypesHint,
|
|
81
|
+
...m
|
|
82
|
+
}), [G.fileTypesHint, m]);
|
|
83
|
+
if (!A) return null;
|
|
84
|
+
let q = F || M ? /* @__PURE__ */ C(x, { children: [
|
|
83
85
|
/* @__PURE__ */ S(t, {}),
|
|
84
86
|
/* @__PURE__ */ S(h, {
|
|
85
|
-
logoUrl:
|
|
86
|
-
isLoading:
|
|
87
|
-
isDeleting:
|
|
88
|
-
status:
|
|
89
|
-
fileName:
|
|
90
|
-
errorMessage:
|
|
91
|
-
isDraggingOver:
|
|
92
|
-
onBrowse:
|
|
93
|
-
onFilesSelected:
|
|
94
|
-
accept:
|
|
95
|
-
onDelete:
|
|
96
|
-
onDismissError:
|
|
97
|
-
onDragOver:
|
|
98
|
-
onDragLeave:
|
|
99
|
-
onDrop:
|
|
100
|
-
labels:
|
|
101
|
-
dropzoneLabels:
|
|
87
|
+
logoUrl: G.uploadedLogoUrl ?? j?.logo?.url,
|
|
88
|
+
isLoading: M,
|
|
89
|
+
isDeleting: G.isDeleting,
|
|
90
|
+
status: G.status,
|
|
91
|
+
fileName: G.fileName,
|
|
92
|
+
errorMessage: G.errorMessage,
|
|
93
|
+
isDraggingOver: G.isDraggingOver,
|
|
94
|
+
onBrowse: G.onBrowse,
|
|
95
|
+
onFilesSelected: G.onFilesSelected,
|
|
96
|
+
accept: G.fileInputProps.accept,
|
|
97
|
+
onDelete: G.onDelete,
|
|
98
|
+
onDismissError: G.onDismissError,
|
|
99
|
+
onDragOver: G.onDragOver,
|
|
100
|
+
onDragLeave: G.onDragLeave,
|
|
101
|
+
onDrop: G.onDrop,
|
|
102
|
+
labels: p,
|
|
103
|
+
dropzoneLabels: K
|
|
102
104
|
}),
|
|
103
|
-
/* @__PURE__ */ S("input", { ...
|
|
105
|
+
/* @__PURE__ */ S("input", { ...G.fileInputProps })
|
|
104
106
|
] }) : void 0;
|
|
105
|
-
return !
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
return !L || !V ? /* @__PURE__ */ S(d, {
|
|
108
|
+
headerStart: r,
|
|
109
|
+
headerActionContainer: o,
|
|
110
|
+
logo: q,
|
|
111
|
+
isLoading: M || R || H,
|
|
112
|
+
isError: N || z || U,
|
|
109
113
|
onRetry: () => {
|
|
110
|
-
|
|
114
|
+
P(), B(), W();
|
|
111
115
|
},
|
|
112
116
|
onSubmit: () => void 0,
|
|
113
|
-
labels:
|
|
117
|
+
labels: f
|
|
114
118
|
}) : /* @__PURE__ */ S(w, {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
headerStart: r,
|
|
120
|
+
headerActionContainer: o,
|
|
121
|
+
entityId: F ?? "",
|
|
122
|
+
entitySettings: L,
|
|
123
|
+
nextNumbers: V,
|
|
124
|
+
logo: q,
|
|
125
|
+
confirmLeaveRef: O,
|
|
126
|
+
panelLabels: f,
|
|
127
|
+
messageLabels: T,
|
|
128
|
+
...E
|
|
129
|
+
}, F);
|
|
124
130
|
}
|
|
125
131
|
function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: s, uiFramework: c, analytics: l, disclosuresAcceptance: u, providerLabels: d, errorFallback: f, onError: p, ref: m, ...h }) {
|
|
126
132
|
return /* @__PURE__ */ S(r, {
|
|
@@ -3,52 +3,71 @@ import { ErrorState as r } from "../../../../shared/ui/dist/lib/ErrorState/Error
|
|
|
3
3
|
import { LoadingRegion as i } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
4
4
|
import "../../../../shared/ui/dist/index.js";
|
|
5
5
|
import { INVOICE_SETTINGS_PANEL_LABELS_EN as a } from "./index2.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useId as o } from "react";
|
|
7
|
+
import { createPortal as s } from "react-dom";
|
|
8
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
9
|
// ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
+
function u({ headerStart: u, headerActionContainer: d, isLoading: f, isError: p, onRetry: m, logo: h, children: g, submitDisabled: _, onSubmit: v, labels: y }) {
|
|
11
|
+
let b = o(), x = {
|
|
10
12
|
...a,
|
|
11
|
-
...
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
...y
|
|
14
|
+
}, S = !p && !f ? /* @__PURE__ */ c(e, {
|
|
15
|
+
type: "submit",
|
|
16
|
+
form: b,
|
|
17
|
+
size: "sm",
|
|
18
|
+
disabled: _,
|
|
19
|
+
children: x.submitButton
|
|
20
|
+
}) : null;
|
|
21
|
+
return /* @__PURE__ */ l("div", {
|
|
22
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
23
|
+
children: [
|
|
24
|
+
d ? s(S, d) : null,
|
|
25
|
+
u ? /* @__PURE__ */ l("header", {
|
|
26
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
|
|
27
|
+
children: [u, d === void 0 ? S : null]
|
|
28
|
+
}) : null,
|
|
29
|
+
/* @__PURE__ */ c("div", {
|
|
30
|
+
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
31
|
+
children: /* @__PURE__ */ l("div", {
|
|
32
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:w-full ttw:max-w-163",
|
|
33
|
+
children: [h, p ? /* @__PURE__ */ c(r, {
|
|
34
|
+
title: x.errorTitle,
|
|
35
|
+
description: x.errorDescription,
|
|
36
|
+
retryLabel: x.errorRetry,
|
|
37
|
+
onRetry: m
|
|
38
|
+
}) : f ? /* @__PURE__ */ c(i, {
|
|
39
|
+
isLoading: !0,
|
|
40
|
+
loadingLabel: x.loading,
|
|
41
|
+
children: /* @__PURE__ */ l("div", {
|
|
42
|
+
"aria-hidden": !0,
|
|
43
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ c(n, { className: "ttw:h-6 ttw:w-40" }),
|
|
46
|
+
/* @__PURE__ */ c(n, { className: "ttw:h-20 ttw:w-full" }),
|
|
47
|
+
/* @__PURE__ */ c(n, { className: "ttw:h-9 ttw:w-full" })
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
}) : /* @__PURE__ */ l("form", {
|
|
51
|
+
id: b,
|
|
52
|
+
noValidate: !0,
|
|
53
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
54
|
+
onSubmit: (e) => {
|
|
55
|
+
e.preventDefault(), v();
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ c(t, {}),
|
|
59
|
+
g,
|
|
60
|
+
!u && d === void 0 && /* @__PURE__ */ c(e, {
|
|
61
|
+
type: "submit",
|
|
62
|
+
className: "ttw:w-fit ttw:self-end",
|
|
63
|
+
disabled: _,
|
|
64
|
+
children: x.submitButton
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})]
|
|
33
68
|
})
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
37
|
-
onSubmit: (e) => {
|
|
38
|
-
e.preventDefault(), m();
|
|
39
|
-
},
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ o(t, {}),
|
|
42
|
-
f,
|
|
43
|
-
/* @__PURE__ */ o(e, {
|
|
44
|
-
type: "submit",
|
|
45
|
-
className: "ttw:w-fit",
|
|
46
|
-
disabled: p,
|
|
47
|
-
children: g.submitButton
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
})]
|
|
51
|
-
})
|
|
69
|
+
})
|
|
70
|
+
]
|
|
52
71
|
});
|
|
53
72
|
}
|
|
54
|
-
export {
|
|
73
|
+
export { u as InvoiceSettingsPanel, u as default };
|
|
@@ -9,7 +9,7 @@ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g
|
|
|
9
9
|
...C
|
|
10
10
|
}, T = u(), E = (e) => `${T}-${e}`, D = (e) => `${T}-${e}-error`, O = (e, t) => t ? D(e) : void 0;
|
|
11
11
|
return /* @__PURE__ */ f("div", {
|
|
12
|
-
className: "ttw:flex ttw:flex-col ttw:gap-
|
|
12
|
+
className: "ttw:@container/invoice-numbering ttw:flex ttw:flex-col ttw:gap-4",
|
|
13
13
|
children: [
|
|
14
14
|
/* @__PURE__ */ f("div", {
|
|
15
15
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:pt-5 ttw:pb-2.5",
|
|
@@ -24,7 +24,7 @@ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g
|
|
|
24
24
|
})]
|
|
25
25
|
}),
|
|
26
26
|
/* @__PURE__ */ f("div", {
|
|
27
|
-
className: "ttw:flex ttw:flex-col ttw:w-full ttw:max-w-
|
|
27
|
+
className: "ttw:flex ttw:flex-col ttw:w-full ttw:max-w-lg ttw:gap-1 ttw:p-4 ttw:bg-muted ttw:rounded-xl",
|
|
28
28
|
children: [/* @__PURE__ */ d(c, {
|
|
29
29
|
variant: "body2",
|
|
30
30
|
color: "muted",
|
|
@@ -37,14 +37,15 @@ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g
|
|
|
37
37
|
})]
|
|
38
38
|
}),
|
|
39
39
|
/* @__PURE__ */ f("div", {
|
|
40
|
-
className: "ttw:
|
|
40
|
+
className: "ttw:grid ttw:w-full ttw:max-w-lg ttw:grid-cols-1 ttw:gap-4 ttw:@md/invoice-numbering:grid-cols-3",
|
|
41
41
|
children: [
|
|
42
42
|
/* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
|
|
43
|
-
className: "ttw:min-w-
|
|
43
|
+
className: "ttw:min-w-0",
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ d(i, {
|
|
46
46
|
htmlFor: E("invoice-prefix"),
|
|
47
47
|
requirement: a.Required,
|
|
48
|
+
className: "ttw:whitespace-nowrap",
|
|
48
49
|
children: w.invoicePrefixLabel
|
|
49
50
|
}),
|
|
50
51
|
/* @__PURE__ */ d(s, {
|
|
@@ -63,11 +64,12 @@ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g
|
|
|
63
64
|
]
|
|
64
65
|
}) }),
|
|
65
66
|
/* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
|
|
66
|
-
className: "ttw:min-w-
|
|
67
|
+
className: "ttw:min-w-0",
|
|
67
68
|
children: [
|
|
68
69
|
/* @__PURE__ */ d(i, {
|
|
69
70
|
htmlFor: E("starting-number"),
|
|
70
71
|
requirement: a.Required,
|
|
72
|
+
className: "ttw:whitespace-nowrap",
|
|
71
73
|
children: w.startingNumberLabel
|
|
72
74
|
}),
|
|
73
75
|
/* @__PURE__ */ d(s, {
|
|
@@ -87,11 +89,12 @@ function p({ previewValue: p, invoicePrefix: m, startingNumber: h, digitCount: g
|
|
|
87
89
|
]
|
|
88
90
|
}) }),
|
|
89
91
|
/* @__PURE__ */ d(t, { children: /* @__PURE__ */ f(n, {
|
|
90
|
-
className: "ttw:min-w-
|
|
92
|
+
className: "ttw:min-w-0",
|
|
91
93
|
children: [
|
|
92
94
|
/* @__PURE__ */ d(i, {
|
|
93
95
|
htmlFor: E("digit-count"),
|
|
94
96
|
requirement: a.Required,
|
|
97
|
+
className: "ttw:whitespace-nowrap",
|
|
95
98
|
children: w.digitCountLabel
|
|
96
99
|
}),
|
|
97
100
|
/* @__PURE__ */ d(s, {
|