@tesouro/embedded-components-react 0.11.101 → 0.11.104
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/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/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +56 -52
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +68 -63
- 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/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/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
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js
CHANGED
|
@@ -4,102 +4,100 @@ import { ApproverGroupsBuilder as c } from "./index14.js";
|
|
|
4
4
|
import { PolicyCardDefaultLabels as l } from "./index15.js";
|
|
5
5
|
import { Fragment as u, useMemo as d } from "react";
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { Trash2 as m } from "lucide-react";
|
|
8
8
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js
|
|
9
|
-
var
|
|
10
|
-
let
|
|
9
|
+
var h = ({ id: h, title: g, sentence: _, approverSteps: v, approverOptions: y, amountCondition: b, onAmountConditionChange: x, onAmountFieldBlur: S, amountConditionErrors: C, onApproverStepsChange: w, onAddApproverStep: T, onRemoveApproverStep: E, approverErrors: D, addApproverStepDisabled: O, isEditing: k, onEdit: A, onCancel: j, onSave: M, onDelete: N, saveDisabled: P, saveDisabledReasons: F, disabled: I, labels: L, ref: R, testIds: z }) => {
|
|
10
|
+
let B = d(() => ({
|
|
11
11
|
...l,
|
|
12
|
-
...
|
|
12
|
+
...L,
|
|
13
13
|
AmountConditionBuilder: {
|
|
14
14
|
...l.AmountConditionBuilder,
|
|
15
|
-
...
|
|
15
|
+
...L?.AmountConditionBuilder
|
|
16
16
|
},
|
|
17
17
|
ApproverGroupsBuilder: {
|
|
18
18
|
...l.ApproverGroupsBuilder,
|
|
19
|
-
...
|
|
19
|
+
...L?.ApproverGroupsBuilder
|
|
20
20
|
}
|
|
21
|
-
}), [
|
|
21
|
+
}), [L]), V = /* @__PURE__ */ f(t, {
|
|
22
22
|
type: "button",
|
|
23
|
-
onClick:
|
|
24
|
-
disabled:
|
|
25
|
-
"data-testid": `policy-card-save-button-${
|
|
26
|
-
children:
|
|
27
|
-
}),
|
|
28
|
-
steps:
|
|
29
|
-
options:
|
|
30
|
-
onStepsChange:
|
|
31
|
-
onAddStep:
|
|
32
|
-
onRemoveStep:
|
|
33
|
-
errors:
|
|
34
|
-
addStepDisabled:
|
|
35
|
-
disabled:
|
|
36
|
-
labels:
|
|
37
|
-
testIds:
|
|
23
|
+
onClick: M,
|
|
24
|
+
disabled: I || P,
|
|
25
|
+
"data-testid": `policy-card-save-button-${h}`,
|
|
26
|
+
children: B.Save
|
|
27
|
+
}), H = {
|
|
28
|
+
steps: v,
|
|
29
|
+
options: y,
|
|
30
|
+
onStepsChange: w,
|
|
31
|
+
onAddStep: T,
|
|
32
|
+
onRemoveStep: E,
|
|
33
|
+
errors: D,
|
|
34
|
+
addStepDisabled: O,
|
|
35
|
+
disabled: I,
|
|
36
|
+
labels: B.ApproverGroupsBuilder,
|
|
37
|
+
testIds: z?.approverGroupsBuilder
|
|
38
38
|
};
|
|
39
39
|
return /* @__PURE__ */ p("div", {
|
|
40
|
-
ref:
|
|
41
|
-
"data-testid": `policy-card-${
|
|
42
|
-
className: `ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:bg-card ttw:p-6 ${
|
|
43
|
-
children: [
|
|
40
|
+
ref: R,
|
|
41
|
+
"data-testid": `policy-card-${h}`,
|
|
42
|
+
className: `ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:bg-card ttw:p-6 ${k ? "ttw:border-primary" : "ttw:border-border"}`,
|
|
43
|
+
children: [k ? null : /* @__PURE__ */ p("div", {
|
|
44
44
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
45
45
|
children: [/* @__PURE__ */ f(o, {
|
|
46
46
|
variant: "body1",
|
|
47
|
-
children:
|
|
47
|
+
children: g
|
|
48
48
|
}), /* @__PURE__ */ f(t, {
|
|
49
49
|
type: "button",
|
|
50
50
|
variant: "ghost",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"data-testid": `policy-card-edit-button-${g}`,
|
|
56
|
-
children: /* @__PURE__ */ f(m, {})
|
|
51
|
+
onClick: A,
|
|
52
|
+
disabled: I,
|
|
53
|
+
"data-testid": `policy-card-edit-button-${h}`,
|
|
54
|
+
children: B.EditAriaLabel
|
|
57
55
|
})]
|
|
58
|
-
}),
|
|
56
|
+
}), k ? /* @__PURE__ */ p("div", {
|
|
59
57
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
60
58
|
children: [
|
|
61
59
|
/* @__PURE__ */ f(s, {
|
|
62
|
-
value:
|
|
63
|
-
onChange:
|
|
64
|
-
onFieldBlur:
|
|
65
|
-
errors:
|
|
66
|
-
disabled:
|
|
67
|
-
labels:
|
|
68
|
-
testIds:
|
|
60
|
+
value: b,
|
|
61
|
+
onChange: x,
|
|
62
|
+
onFieldBlur: S,
|
|
63
|
+
errors: C,
|
|
64
|
+
disabled: I,
|
|
65
|
+
labels: B.AmountConditionBuilder,
|
|
66
|
+
testIds: z?.amountConditionBuilder
|
|
69
67
|
}),
|
|
70
|
-
/* @__PURE__ */ f(c, { ...
|
|
68
|
+
/* @__PURE__ */ f(c, { ...H }),
|
|
71
69
|
/* @__PURE__ */ p("div", {
|
|
72
70
|
className: "ttw:flex ttw:items-center ttw:gap-4 ttw:pt-2",
|
|
73
|
-
children: [
|
|
71
|
+
children: [N ? /* @__PURE__ */ p(t, {
|
|
74
72
|
type: "button",
|
|
75
73
|
variant: "ghost",
|
|
76
|
-
onClick:
|
|
77
|
-
disabled:
|
|
74
|
+
onClick: N,
|
|
75
|
+
disabled: I,
|
|
78
76
|
className: "ttw:w-fit ttw:px-0 ttw:text-destructive ttw:hover:text-destructive",
|
|
79
|
-
"data-testid": `policy-card-delete-button-${
|
|
80
|
-
children: [/* @__PURE__ */ f(
|
|
77
|
+
"data-testid": `policy-card-delete-button-${h}`,
|
|
78
|
+
children: [/* @__PURE__ */ f(m, {}), B.Delete]
|
|
81
79
|
}) : null, /* @__PURE__ */ p("div", {
|
|
82
80
|
className: "ttw:ml-auto ttw:flex ttw:items-center ttw:gap-2",
|
|
83
81
|
children: [/* @__PURE__ */ f(t, {
|
|
84
82
|
type: "button",
|
|
85
83
|
variant: "outline",
|
|
86
|
-
onClick:
|
|
87
|
-
disabled:
|
|
88
|
-
"data-testid": `policy-card-cancel-button-${
|
|
89
|
-
children:
|
|
90
|
-
}),
|
|
84
|
+
onClick: j,
|
|
85
|
+
disabled: I,
|
|
86
|
+
"data-testid": `policy-card-cancel-button-${h}`,
|
|
87
|
+
children: B.Cancel
|
|
88
|
+
}), P && F?.length ? /* @__PURE__ */ f(i, { children: /* @__PURE__ */ p(n, { children: [/* @__PURE__ */ f(a, {
|
|
91
89
|
asChild: !0,
|
|
92
90
|
children: /* @__PURE__ */ f("span", {
|
|
93
91
|
tabIndex: 0,
|
|
94
92
|
className: "ttw:inline-flex ttw:cursor-not-allowed ttw:rounded-md",
|
|
95
|
-
"data-testid": `policy-card-save-blocked-${
|
|
96
|
-
children:
|
|
93
|
+
"data-testid": `policy-card-save-blocked-${h}`,
|
|
94
|
+
children: V
|
|
97
95
|
})
|
|
98
96
|
}), /* @__PURE__ */ f(r, {
|
|
99
97
|
side: "top",
|
|
100
98
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
101
|
-
children:
|
|
102
|
-
})] }) }) :
|
|
99
|
+
children: F.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
|
|
100
|
+
})] }) }) : V]
|
|
103
101
|
})]
|
|
104
102
|
})
|
|
105
103
|
]
|
|
@@ -109,20 +107,20 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
109
107
|
variant: "body2",
|
|
110
108
|
color: "muted",
|
|
111
109
|
className: "ttw:font-medium",
|
|
112
|
-
children:
|
|
113
|
-
}),
|
|
110
|
+
children: _
|
|
111
|
+
}), v.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ p("div", {
|
|
114
112
|
className: "ttw:flex ttw:items-center ttw:gap-2.5 ttw:pl-1",
|
|
115
113
|
children: [/* @__PURE__ */ f(o, {
|
|
116
114
|
variant: "caption",
|
|
117
115
|
color: "muted",
|
|
118
|
-
children:
|
|
116
|
+
children: B.GroupConnector
|
|
119
117
|
}), /* @__PURE__ */ f("div", { className: "ttw:h-px ttw:flex-1 ttw:bg-border" })]
|
|
120
118
|
}) : null, /* @__PURE__ */ f("div", {
|
|
121
119
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1.5",
|
|
122
120
|
children: t.selectedItems.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ f(o, {
|
|
123
121
|
variant: "body2",
|
|
124
122
|
color: "muted",
|
|
125
|
-
children:
|
|
123
|
+
children: B.ApproverConnector
|
|
126
124
|
}) : null, /* @__PURE__ */ f(e, {
|
|
127
125
|
variant: "secondary",
|
|
128
126
|
children: t.label
|
|
@@ -131,4 +129,4 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
131
129
|
})]
|
|
132
130
|
});
|
|
133
131
|
};
|
|
134
|
-
export {
|
|
132
|
+
export { h as PolicyCard };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js
|
|
2
2
|
var e = {
|
|
3
3
|
Title: "No rules created yet",
|
|
4
|
-
Body: "
|
|
4
|
+
Body: "Company admin approval is required when no rule covers a bill amount.",
|
|
5
5
|
TitleWithUnlistedRules: "No rules to show here",
|
|
6
|
-
BodyWithUnlistedRules: "
|
|
6
|
+
BodyWithUnlistedRules: "Company admin approval is required when no rule covers a bill amount.",
|
|
7
7
|
CreateRule: "Create rule"
|
|
8
8
|
};
|
|
9
9
|
export { e as NoPolicyBannerDefaultLabels };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js
|
|
2
2
|
var e = {
|
|
3
|
-
Title: "No rules
|
|
4
|
-
Footer: "
|
|
3
|
+
Title: "No rules cover the following bill amount ranges",
|
|
4
|
+
Footer: "Company admin approval is required when a bill has no assigned approver."
|
|
5
5
|
};
|
|
6
6
|
export { e as GapCoverageAlertDefaultLabels };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js
CHANGED
|
@@ -19,15 +19,15 @@ var p = ({ gaps: p, onSelectGap: m, disabled: h, labels: g, testIds: _ }) => {
|
|
|
19
19
|
/* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l("ul", {
|
|
20
20
|
className: "ttw:my-1.5 ttw:list-disc ttw:space-y-1 ttw:pl-5",
|
|
21
21
|
children: p.map((e) => {
|
|
22
|
-
let t = /* @__PURE__ */ u("button", {
|
|
22
|
+
let t = m ? /* @__PURE__ */ u("button", {
|
|
23
23
|
type: "button",
|
|
24
24
|
className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:text-primary ttw:disabled:pointer-events-none ttw:disabled:opacity-60 ttw:hover:underline",
|
|
25
25
|
disabled: h || e.blockedReason !== void 0,
|
|
26
26
|
onClick: () => m(e.id),
|
|
27
27
|
"data-testid": `gap-coverage-link-${e.id}`,
|
|
28
28
|
children: [e.label, /* @__PURE__ */ l(d, { className: "ttw:size-3" })]
|
|
29
|
-
});
|
|
30
|
-
return /* @__PURE__ */ l("li", { children: e.blockedReason ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
|
|
29
|
+
}) : /* @__PURE__ */ l("span", { children: e.label });
|
|
30
|
+
return /* @__PURE__ */ l("li", { children: e.blockedReason && m ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
|
|
31
31
|
asChild: !0,
|
|
32
32
|
children: /* @__PURE__ */ l("span", {
|
|
33
33
|
tabIndex: 0,
|