@tesouro/embedded-components-react 0.11.71 → 0.11.73
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/README.md +1 -0
- package/dist/index.css +35 -192
- package/dist/index.d.ts +75 -71
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
- 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/ui/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +2302 -2284
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
|
@@ -1,184 +1,118 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { FieldError as e, FieldRequirement as t, FormSheet as n, Input as r, Label as i, RequiredFieldsLegend as a, Textarea as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { InlineErrorAlert as s } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
+
import "../../../../shared/ui/dist/index.js";
|
|
4
|
+
import { ACCOUNT_FORM_SHEET_LABELS_EN as c } from "./index2.js";
|
|
5
|
+
import { useId as l } from "react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
7
|
// ../../libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
11
|
-
},
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
open:
|
|
14
|
-
onOpenChange:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
function f({ open: f, onOpenChange: p, title: m, description: h, values: g, errors: _, inProgress: v, descriptionCounterText: y, onNameChange: b, onGlCodeChange: x, onDescriptionChange: S, onSubmit: C, onCancel: w, onDelete: T, labels: E }) {
|
|
9
|
+
let D = {
|
|
10
|
+
...c,
|
|
11
|
+
...E
|
|
12
|
+
}, O = l();
|
|
13
|
+
return /* @__PURE__ */ u(n, {
|
|
14
|
+
open: f,
|
|
15
|
+
onOpenChange: (e) => {
|
|
16
|
+
v || (e || w(), p(e));
|
|
17
|
+
},
|
|
18
|
+
title: m,
|
|
19
|
+
description: h,
|
|
20
|
+
submitting: v,
|
|
21
|
+
onSubmit: () => C(),
|
|
22
|
+
onDelete: T,
|
|
23
|
+
labels: {
|
|
24
|
+
submit: D.saveButton,
|
|
25
|
+
cancel: D.cancelButton,
|
|
26
|
+
close: D.closeSheet,
|
|
27
|
+
delete: D.deleteAction
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ d("div", {
|
|
30
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
|
|
18
31
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */ S("div", {
|
|
71
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ x(o, {
|
|
74
|
-
htmlFor: `${U}-gl-code`,
|
|
75
|
-
children: H.glCodeLabel
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */ x(a, {
|
|
78
|
-
id: `${U}-gl-code`,
|
|
79
|
-
"data-autofocus": !0,
|
|
80
|
-
maxLength: 20,
|
|
81
|
-
value: A.nominal_code,
|
|
82
|
-
placeholder: H.glCodePlaceholder,
|
|
83
|
-
"aria-invalid": !!j?.nominal_code,
|
|
84
|
-
"aria-describedby": j?.nominal_code ? `${U}-gl-code-error` : void 0,
|
|
85
|
-
disabled: M,
|
|
86
|
-
onChange: (e) => I(e.target.value)
|
|
87
|
-
}),
|
|
88
|
-
j?.nominal_code && /* @__PURE__ */ x("p", {
|
|
89
|
-
role: "alert",
|
|
90
|
-
id: `${U}-gl-code-error`,
|
|
91
|
-
className: W,
|
|
92
|
-
children: j.nominal_code
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ S("div", {
|
|
97
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ x(o, {
|
|
100
|
-
htmlFor: `${U}-name`,
|
|
101
|
-
children: H.nameLabel
|
|
102
|
-
}),
|
|
103
|
-
/* @__PURE__ */ x(a, {
|
|
104
|
-
id: `${U}-name`,
|
|
105
|
-
value: A.name,
|
|
106
|
-
placeholder: H.namePlaceholder,
|
|
107
|
-
"aria-invalid": !!j?.name,
|
|
108
|
-
"aria-describedby": j?.name ? `${U}-name-error` : void 0,
|
|
109
|
-
disabled: M,
|
|
110
|
-
onChange: (e) => F(e.target.value)
|
|
111
|
-
}),
|
|
112
|
-
j?.name && /* @__PURE__ */ x("p", {
|
|
113
|
-
role: "alert",
|
|
114
|
-
id: `${U}-name-error`,
|
|
115
|
-
className: W,
|
|
116
|
-
children: j.name
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ S("div", {
|
|
121
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
122
|
-
children: [
|
|
123
|
-
/* @__PURE__ */ x(o, {
|
|
124
|
-
htmlFor: `${U}-description`,
|
|
125
|
-
children: H.descriptionLabel
|
|
126
|
-
}),
|
|
127
|
-
/* @__PURE__ */ x(m, {
|
|
128
|
-
id: `${U}-description`,
|
|
129
|
-
rows: 4,
|
|
130
|
-
maxLength: 280,
|
|
131
|
-
value: A.description,
|
|
132
|
-
placeholder: H.descriptionPlaceholder,
|
|
133
|
-
"aria-invalid": !!j?.description,
|
|
134
|
-
"aria-describedby": j?.description ? `${U}-description-error` : `${U}-description-counter`,
|
|
135
|
-
disabled: M,
|
|
136
|
-
onChange: (e) => L(e.target.value)
|
|
137
|
-
}),
|
|
138
|
-
/* @__PURE__ */ x("p", {
|
|
139
|
-
id: `${U}-description-counter`,
|
|
140
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
141
|
-
children: P
|
|
142
|
-
}),
|
|
143
|
-
j?.description && /* @__PURE__ */ x("p", {
|
|
144
|
-
role: "alert",
|
|
145
|
-
id: `${U}-description-error`,
|
|
146
|
-
className: W,
|
|
147
|
-
children: j.description
|
|
148
|
-
})
|
|
149
|
-
]
|
|
150
|
-
})
|
|
151
|
-
]
|
|
152
|
-
})
|
|
32
|
+
_?.form && /* @__PURE__ */ u(s, { children: _.form }),
|
|
33
|
+
/* @__PURE__ */ u(a, {}),
|
|
34
|
+
/* @__PURE__ */ d("div", {
|
|
35
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ u(i, {
|
|
38
|
+
htmlFor: `${O}-gl-code`,
|
|
39
|
+
requirement: t.Required,
|
|
40
|
+
children: D.glCodeLabel
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ u(r, {
|
|
43
|
+
id: `${O}-gl-code`,
|
|
44
|
+
required: !0,
|
|
45
|
+
"data-autofocus": !0,
|
|
46
|
+
maxLength: 20,
|
|
47
|
+
value: g.nominal_code,
|
|
48
|
+
placeholder: D.glCodePlaceholder,
|
|
49
|
+
"aria-invalid": !!_?.nominal_code,
|
|
50
|
+
"aria-describedby": _?.nominal_code ? `${O}-gl-code-error` : void 0,
|
|
51
|
+
disabled: v,
|
|
52
|
+
onChange: (e) => x(e.target.value)
|
|
53
|
+
}),
|
|
54
|
+
_?.nominal_code && /* @__PURE__ */ u(e, {
|
|
55
|
+
id: `${O}-gl-code-error`,
|
|
56
|
+
children: _.nominal_code
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ d("div", {
|
|
61
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ u(i, {
|
|
64
|
+
htmlFor: `${O}-name`,
|
|
65
|
+
requirement: t.Required,
|
|
66
|
+
children: D.nameLabel
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ u(r, {
|
|
69
|
+
id: `${O}-name`,
|
|
70
|
+
required: !0,
|
|
71
|
+
value: g.name,
|
|
72
|
+
placeholder: D.namePlaceholder,
|
|
73
|
+
"aria-invalid": !!_?.name,
|
|
74
|
+
"aria-describedby": _?.name ? `${O}-name-error` : void 0,
|
|
75
|
+
disabled: v,
|
|
76
|
+
onChange: (e) => b(e.target.value)
|
|
77
|
+
}),
|
|
78
|
+
_?.name && /* @__PURE__ */ u(e, {
|
|
79
|
+
id: `${O}-name-error`,
|
|
80
|
+
children: _.name
|
|
81
|
+
})
|
|
82
|
+
]
|
|
153
83
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
className: "ttw:flex ttw:flex-
|
|
156
|
-
children: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
84
|
+
/* @__PURE__ */ d("div", {
|
|
85
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ u(i, {
|
|
88
|
+
htmlFor: `${O}-description`,
|
|
89
|
+
requirement: t.Optional,
|
|
90
|
+
children: D.descriptionLabel
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ u(o, {
|
|
93
|
+
id: `${O}-description`,
|
|
94
|
+
rows: 4,
|
|
95
|
+
maxLength: 280,
|
|
96
|
+
value: g.description,
|
|
97
|
+
placeholder: D.descriptionPlaceholder,
|
|
98
|
+
"aria-invalid": !!_?.description,
|
|
99
|
+
"aria-describedby": _?.description ? `${O}-description-error` : `${O}-description-counter`,
|
|
100
|
+
disabled: v,
|
|
101
|
+
onChange: (e) => S(e.target.value)
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ u("p", {
|
|
104
|
+
id: `${O}-description-counter`,
|
|
105
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
106
|
+
children: y
|
|
107
|
+
}),
|
|
108
|
+
_?.description && /* @__PURE__ */ u(e, {
|
|
109
|
+
id: `${O}-description-error`,
|
|
110
|
+
children: _.description
|
|
177
111
|
})
|
|
178
|
-
|
|
179
|
-
})
|
|
112
|
+
]
|
|
113
|
+
})
|
|
180
114
|
]
|
|
181
115
|
})
|
|
182
116
|
});
|
|
183
117
|
}
|
|
184
|
-
export {
|
|
118
|
+
export { f as AccountFormSheet, f as default };
|
|
@@ -1,42 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { ConfirmDialog as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { InlineErrorAlert as t } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
+
import "../../../../shared/ui/dist/index.js";
|
|
4
|
+
import { ACCOUNT_DELETE_DIALOG_LABELS_EN as n } from "./index2.js";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { Trash2 as i } from "lucide-react";
|
|
4
7
|
// ../../libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
...
|
|
8
|
-
...
|
|
8
|
+
function a({ open: a, onOpenChange: o, title: s, message: c, isDeleting: l, error: u, onConfirm: d, onCancel: f, labels: p }) {
|
|
9
|
+
let m = {
|
|
10
|
+
...n,
|
|
11
|
+
...p
|
|
9
12
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
open:
|
|
12
|
-
onOpenChange:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClick: v,
|
|
28
|
-
disabled: h,
|
|
29
|
-
children: b.cancelButton
|
|
30
|
-
})
|
|
31
|
-
}), /* @__PURE__ */ l(s, {
|
|
32
|
-
variant: "destructive",
|
|
33
|
-
onClick: _,
|
|
34
|
-
disabled: h,
|
|
35
|
-
loading: h,
|
|
36
|
-
children: b.confirmButton
|
|
37
|
-
})] })
|
|
38
|
-
]
|
|
39
|
-
})
|
|
13
|
+
return /* @__PURE__ */ r(e, {
|
|
14
|
+
open: a,
|
|
15
|
+
onOpenChange: (e) => {
|
|
16
|
+
l || (e || f(), o(e));
|
|
17
|
+
},
|
|
18
|
+
title: s,
|
|
19
|
+
description: c ?? m.message,
|
|
20
|
+
icon: /* @__PURE__ */ r(i, { "aria-hidden": !0 }),
|
|
21
|
+
destructive: !0,
|
|
22
|
+
loading: l,
|
|
23
|
+
onConfirm: d,
|
|
24
|
+
labels: {
|
|
25
|
+
confirm: m.confirmButton,
|
|
26
|
+
cancel: m.cancelButton,
|
|
27
|
+
close: m.close
|
|
28
|
+
},
|
|
29
|
+
children: u && /* @__PURE__ */ r(t, { children: u })
|
|
40
30
|
});
|
|
41
31
|
}
|
|
42
|
-
export {
|
|
32
|
+
export { a as AccountDeleteDialog, a as default };
|
|
@@ -11,24 +11,27 @@ import { useState as o } from "react";
|
|
|
11
11
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
12
12
|
// ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js
|
|
13
13
|
function l({ approvalsLabel: l, requirementsLabel: u }) {
|
|
14
|
-
let [d, f] = o("approvals");
|
|
14
|
+
let [d, f] = o("approvals"), [p, m] = o(null);
|
|
15
15
|
return /* @__PURE__ */ s("div", {
|
|
16
16
|
className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
17
17
|
children: /* @__PURE__ */ c(e, {
|
|
18
18
|
value: d,
|
|
19
19
|
onValueChange: f,
|
|
20
|
-
className: "ttw:w-full ttw:
|
|
20
|
+
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */ c(
|
|
23
|
-
|
|
24
|
-
children:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
/* @__PURE__ */ c("div", {
|
|
23
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
24
|
+
children: [/* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
|
|
25
|
+
value: "approvals",
|
|
26
|
+
children: l
|
|
27
|
+
}), /* @__PURE__ */ s(r, {
|
|
28
|
+
value: "requirements",
|
|
29
|
+
children: u
|
|
30
|
+
})] }), /* @__PURE__ */ s("div", { ref: m })]
|
|
31
|
+
}),
|
|
29
32
|
/* @__PURE__ */ s(t, {
|
|
30
33
|
value: "approvals",
|
|
31
|
-
children: /* @__PURE__ */ s(i, {})
|
|
34
|
+
children: /* @__PURE__ */ s(i, { headerActionContainer: p })
|
|
32
35
|
}),
|
|
33
36
|
/* @__PURE__ */ s(t, {
|
|
34
37
|
value: "requirements",
|
|
@@ -48,7 +48,7 @@ var T = {
|
|
|
48
48
|
[s.Legal]: [],
|
|
49
49
|
[s.Help]: []
|
|
50
50
|
};
|
|
51
|
-
function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitialView: E, helpContactUrl: D, helpFaq: O, profileContactUrl: k,
|
|
51
|
+
function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitialView: E, helpContactUrl: D, helpFaq: O, profileContactUrl: k, showProfileHeader: A, selectedSection: j, defaultSelectedSection: M, onSelectedSectionChange: ee, additionalSections: te, profileContent: ne, teamContent: re, billPayContent: N, helpContent: P, expenseContent: F, accountingContent: I, invoiceContent: L, legalContent: R }) {
|
|
52
52
|
let z = {
|
|
53
53
|
...o,
|
|
54
54
|
...r
|
|
@@ -60,12 +60,15 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
|
|
|
60
60
|
{
|
|
61
61
|
id: s.Profile,
|
|
62
62
|
label: z.profileSection,
|
|
63
|
-
content:
|
|
63
|
+
content: ne ?? /* @__PURE__ */ C(v, {
|
|
64
|
+
contactUrl: k,
|
|
65
|
+
showHeader: A
|
|
66
|
+
})
|
|
64
67
|
},
|
|
65
68
|
{
|
|
66
69
|
id: s.Team,
|
|
67
70
|
label: z.teamSection,
|
|
68
|
-
content:
|
|
71
|
+
content: re ?? /* @__PURE__ */ C(m, {
|
|
69
72
|
acceptInviteRedirectUri: u,
|
|
70
73
|
initialView: K ? void 0 : E
|
|
71
74
|
})
|
|
@@ -86,7 +89,7 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
|
|
|
86
89
|
{
|
|
87
90
|
id: s.BillPay,
|
|
88
91
|
label: z.billPaySection,
|
|
89
|
-
content:
|
|
92
|
+
content: N ?? /* @__PURE__ */ C(a, {
|
|
90
93
|
showHeaderTitle: !1,
|
|
91
94
|
componentLabels: { header: { Description: z.billPayDescription } }
|
|
92
95
|
})
|
|
@@ -109,14 +112,14 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
|
|
|
109
112
|
faq: O
|
|
110
113
|
})
|
|
111
114
|
}
|
|
112
|
-
], J = c(q.filter((t) => T[t.id].every((t) => e(U, [t]))),
|
|
113
|
-
prop:
|
|
114
|
-
defaultProp:
|
|
115
|
-
onChange:
|
|
115
|
+
], J = c(q.filter((t) => T[t.id].every((t) => e(U, [t]))), te ?? []), Y = J[0]?.id ?? "", [X, Z] = w({
|
|
116
|
+
prop: j,
|
|
117
|
+
defaultProp: M ?? Y,
|
|
118
|
+
onChange: ee,
|
|
116
119
|
caller: "SettingsWidget"
|
|
117
120
|
}), Q = J.some((e) => e.id === X) ? X : Y, $ = Q === s.Team;
|
|
118
121
|
W === "unseen" && $ ? G("showing") : W === "showing" && !$ && G("spent");
|
|
119
|
-
let
|
|
122
|
+
let ie = y((e) => {
|
|
120
123
|
let t = B.current;
|
|
121
124
|
Q !== s.Invoice || !t ? Z(e) : t.confirmLeave().then((t) => {
|
|
122
125
|
t && Z(e);
|
|
@@ -126,12 +129,12 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
|
|
|
126
129
|
labels: t,
|
|
127
130
|
sections: J,
|
|
128
131
|
selectedSectionId: Q,
|
|
129
|
-
onSectionChange:
|
|
132
|
+
onSectionChange: ie
|
|
130
133
|
});
|
|
131
134
|
}
|
|
132
|
-
function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitialView: i, helpContactUrl: a, helpFaq: o, profileContactUrl: s,
|
|
135
|
+
function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitialView: i, helpContactUrl: a, helpFaq: o, profileContactUrl: s, showProfileHeader: c, selectedSection: l, defaultSelectedSection: d, onSelectedSectionChange: f, additionalSections: p, profileContent: m, teamContent: h, billPayContent: g, helpContent: _, expenseContent: v, accountingContent: y, invoiceContent: b, legalContent: x, ...S }) {
|
|
133
136
|
return /* @__PURE__ */ C(r, {
|
|
134
|
-
...
|
|
137
|
+
...S,
|
|
135
138
|
widgetName: u,
|
|
136
139
|
children: /* @__PURE__ */ C(E, {
|
|
137
140
|
labels: e,
|
|
@@ -141,18 +144,19 @@ function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitia
|
|
|
141
144
|
helpContactUrl: a,
|
|
142
145
|
helpFaq: o,
|
|
143
146
|
profileContactUrl: s,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
showProfileHeader: c,
|
|
148
|
+
selectedSection: l,
|
|
149
|
+
defaultSelectedSection: d,
|
|
150
|
+
onSelectedSectionChange: f,
|
|
151
|
+
additionalSections: p,
|
|
152
|
+
profileContent: m,
|
|
153
|
+
teamContent: h,
|
|
154
|
+
billPayContent: g,
|
|
155
|
+
helpContent: _,
|
|
156
|
+
expenseContent: v,
|
|
157
|
+
accountingContent: y,
|
|
158
|
+
invoiceContent: b,
|
|
159
|
+
legalContent: x
|
|
156
160
|
})
|
|
157
161
|
});
|
|
158
162
|
}
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js
CHANGED
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { HELP_WIDGET_LABELS_EN as
|
|
1
|
+
import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Heading as i } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { HELP_WIDGET_LABELS_EN as a } from "../../contract/dist/index2.js";
|
|
3
3
|
import "../../contract/dist/index.js";
|
|
4
|
-
import { AnswerBlocks as
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { AnswerBlocks as o } from "./index2.js";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
...
|
|
11
|
-
...
|
|
7
|
+
var l = "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6";
|
|
8
|
+
function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
|
|
9
|
+
let m = {
|
|
10
|
+
...a,
|
|
11
|
+
...p
|
|
12
12
|
};
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
className:
|
|
15
|
-
children: /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ s("div", {
|
|
14
|
+
className: l,
|
|
15
|
+
children: /* @__PURE__ */ c("div", {
|
|
16
16
|
className: "ttw:space-y-8",
|
|
17
|
-
children: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
children: [u.map((a) => /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
|
|
18
|
+
variant: "section",
|
|
19
|
+
level: 3,
|
|
20
|
+
className: "ttw:mb-2",
|
|
21
|
+
children: a.title
|
|
22
|
+
}), /* @__PURE__ */ s(e, {
|
|
21
23
|
type: "single",
|
|
22
24
|
collapsible: !0,
|
|
23
25
|
className: "ttw:w-full ttw:space-y-3",
|
|
24
|
-
children:
|
|
25
|
-
value: `${
|
|
26
|
-
className: "ttw:
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
}, `${
|
|
29
|
-
})] },
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
children: a.items.map((e, i) => /* @__PURE__ */ c(n, {
|
|
27
|
+
value: `${a.title}-${i}`,
|
|
28
|
+
className: "ttw:border-border",
|
|
29
|
+
children: [/* @__PURE__ */ s(r, { children: e.question }), /* @__PURE__ */ s(t, { children: /* @__PURE__ */ s(o, { answers: e.answers }) })]
|
|
30
|
+
}, `${a.title}-${i}`))
|
|
31
|
+
})] }, a.title)), f && d && /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
|
|
32
|
+
variant: "section",
|
|
33
|
+
level: 3,
|
|
34
|
+
className: "ttw:mb-1",
|
|
35
|
+
children: m.contactUsTitle
|
|
36
|
+
}), /* @__PURE__ */ c("p", {
|
|
33
37
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
34
38
|
children: [
|
|
35
|
-
|
|
39
|
+
m.contactUsBody,
|
|
36
40
|
" ",
|
|
37
|
-
|
|
41
|
+
d,
|
|
38
42
|
" ",
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
href:
|
|
43
|
+
/* @__PURE__ */ s("a", {
|
|
44
|
+
href: f,
|
|
41
45
|
target: "_blank",
|
|
42
46
|
rel: "noopener noreferrer",
|
|
43
47
|
className: "ttw:font-medium ttw:text-primary ttw:underline",
|
|
44
|
-
children:
|
|
48
|
+
children: m.contactUsLinkText
|
|
45
49
|
}),
|
|
46
50
|
"."
|
|
47
51
|
]
|
|
@@ -49,4 +53,4 @@ function l({ faq: l, bankName: u, contactUrl: d, labels: f }) {
|
|
|
49
53
|
})
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
|
-
export {
|
|
56
|
+
export { u as HelpWidgetShadcn, u as default };
|
|
@@ -90,6 +90,8 @@ function T({ handleRef: r, panelLabels: o, logoLabels: u, dropzoneLabels: f, mes
|
|
|
90
90
|
errorMessage: U.errorMessage,
|
|
91
91
|
isDraggingOver: U.isDraggingOver,
|
|
92
92
|
onBrowse: U.onBrowse,
|
|
93
|
+
onFilesSelected: U.onFilesSelected,
|
|
94
|
+
accept: U.fileInputProps.accept,
|
|
93
95
|
onDelete: U.onDelete,
|
|
94
96
|
onDismissError: U.onDismissError,
|
|
95
97
|
onDragOver: U.onDragOver,
|
|
@@ -34,11 +34,7 @@ function g({ entityId: r, entitySettings: f, nextNumbers: p, messageLabels: m })
|
|
|
34
34
|
n && !(n in e) && (e[n] = t.message);
|
|
35
35
|
}
|
|
36
36
|
return e;
|
|
37
|
-
}, [k]), j = c((e) => C[e] !== T[e], [C, T]), M = l(() => Object.keys(T).some((e) => C[e] !== T[e]), [C, T]), N = c((e) => D
|
|
38
|
-
A,
|
|
39
|
-
D,
|
|
40
|
-
j
|
|
41
|
-
]), P = c((e, t) => {
|
|
37
|
+
}, [k]), j = c((e) => C[e] !== T[e], [C, T]), M = l(() => Object.keys(T).some((e) => C[e] !== T[e]), [C, T]), N = c((e) => D ? A[e] : void 0, [A, D]), P = c((e, t) => {
|
|
42
38
|
w((n) => ({
|
|
43
39
|
...n,
|
|
44
40
|
[e]: t
|
|
@@ -63,6 +63,9 @@ function d({ entityId: d, labels: f }) {
|
|
|
63
63
|
uploadedLogoUrl: w,
|
|
64
64
|
fileTypesHint: p.logoFileTypesHint(10),
|
|
65
65
|
onBrowse: a(() => m.current?.click(), []),
|
|
66
|
+
onFilesSelected: a((e) => {
|
|
67
|
+
e[0] && A(e[0]);
|
|
68
|
+
}, [A]),
|
|
66
69
|
onDelete: a(async () => {
|
|
67
70
|
if (d) try {
|
|
68
71
|
await D({ entityId: d }), j(), e.success(p.logoDeleted);
|
|
@@ -4,6 +4,7 @@ var e = {
|
|
|
4
4
|
message: "Any unsaved changes will be lost.",
|
|
5
5
|
question: "Are you sure you want to quit without saving?",
|
|
6
6
|
confirmButton: "Quit without saving",
|
|
7
|
-
cancelButton: "Cancel"
|
|
7
|
+
cancelButton: "Cancel",
|
|
8
|
+
close: "Close"
|
|
8
9
|
};
|
|
9
10
|
export { e as DISCARD_CHANGES_DIALOG_LABELS_EN };
|