@tesouro/embedded-components-react 0.3.16 → 0.3.18
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.d.ts +22 -1
- package/dist/index.js +10 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +11 -1
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/BalancesWidget.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +21 -21
- package/dist/lib/BankAccountOnboardingWidget.js +1 -1
- package/dist/lib/CardsWidget.js +1 -1
- package/dist/lib/ExpenseApprovalPoliciesWidget.js +1 -1
- package/dist/lib/ExpenseManagementWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +1 -1
- package/dist/lib/ReceiptMatchWidget.js +1 -1
- package/dist/lib/TransfersWidget.js +1 -1
- package/dist/lib/UploadReceiptWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +10 -140
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +152 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js +15 -64
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index6.js +75 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/SingleBalance/SingleBalance.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index10.js +109 -169
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +170 -63
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +73 -81
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +77 -101
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +110 -83
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +91 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +7 -28
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +26 -320
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +341 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index9.js +29 -100
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +80 -77
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsHeader.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index5.js +24 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +28 -55
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +54 -209
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +206 -81
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +95 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardFaceSwatch.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +31 -30
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -255
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +253 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -71
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +7 -218
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +219 -79
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +2 -47
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +49 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleCard.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ApprovalRuleForm.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +11 -8
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +12 -14
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +21 -62
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js +73 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +67 -46
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/testIds.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +151 -135
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +16 -13
- 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 +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js +6 -6
- 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/lib/OnboardingShell/OnboardingShell.js +21 -20
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +18 -99
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js
CHANGED
|
@@ -5,17 +5,17 @@ import { useMemo as s } from "react";
|
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
import { Plus as u, Trash2 as d } from "lucide-react";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index14.js
|
|
8
|
-
var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g, errors: _, addStepDisabled: v, disabled: y, isLoading: b, error: x, labels: S }) => {
|
|
9
|
-
let
|
|
8
|
+
var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g, errors: _, addStepDisabled: v, disabled: y, isLoading: b, error: x, labels: S, testIds: C }) => {
|
|
9
|
+
let w = s(() => ({
|
|
10
10
|
...a,
|
|
11
11
|
...S
|
|
12
12
|
}), [S]);
|
|
13
13
|
if (b) return /* @__PURE__ */ l("div", {
|
|
14
|
-
"data-testid":
|
|
14
|
+
"data-testid": C?.loading,
|
|
15
15
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
16
16
|
children: [/* @__PURE__ */ c("span", {
|
|
17
17
|
className: "ttw:sr-only",
|
|
18
|
-
children:
|
|
18
|
+
children: w.LoadingMessage
|
|
19
19
|
}), [0, 1].map((e) => /* @__PURE__ */ l("div", {
|
|
20
20
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
21
21
|
children: [/* @__PURE__ */ c(r, {
|
|
@@ -29,31 +29,31 @@ var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g
|
|
|
29
29
|
});
|
|
30
30
|
if (x) return /* @__PURE__ */ c(e, {
|
|
31
31
|
variant: "destructive",
|
|
32
|
-
"data-testid":
|
|
32
|
+
"data-testid": C?.error,
|
|
33
33
|
children: /* @__PURE__ */ c(t, { children: x })
|
|
34
34
|
});
|
|
35
|
-
let
|
|
35
|
+
let T = (e, t) => {
|
|
36
36
|
m(f.map((n) => n.id === e ? {
|
|
37
37
|
...n,
|
|
38
38
|
selectedItems: t
|
|
39
39
|
} : n));
|
|
40
40
|
};
|
|
41
41
|
return /* @__PURE__ */ l("div", {
|
|
42
|
-
"data-testid":
|
|
42
|
+
"data-testid": C?.root,
|
|
43
43
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ c(i, {
|
|
46
|
-
"data-testid":
|
|
46
|
+
"data-testid": C?.description,
|
|
47
47
|
variant: "body2",
|
|
48
48
|
color: "muted",
|
|
49
49
|
className: "ttw:font-medium",
|
|
50
|
-
children:
|
|
50
|
+
children: w.Description
|
|
51
51
|
}),
|
|
52
52
|
f.length === 0 ? /* @__PURE__ */ c(i, {
|
|
53
|
-
"data-testid":
|
|
53
|
+
"data-testid": C?.empty,
|
|
54
54
|
variant: "body2",
|
|
55
55
|
color: "muted",
|
|
56
|
-
children:
|
|
56
|
+
children: w.EmptyStateMessage
|
|
57
57
|
}) : f.map((e, t) => /* @__PURE__ */ l("div", {
|
|
58
58
|
"data-testid": `approver-group-${e.id}`,
|
|
59
59
|
className: "ttw:grid ttw:grid-cols-[3rem_minmax(0,1fr)_auto] ttw:items-center ttw:gap-2",
|
|
@@ -61,7 +61,7 @@ var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g
|
|
|
61
61
|
/* @__PURE__ */ c(i, {
|
|
62
62
|
variant: "body2",
|
|
63
63
|
className: "ttw:font-medium",
|
|
64
|
-
children: t === 0 ?
|
|
64
|
+
children: t === 0 ? w.FirstGroupConnector : w.GroupConnector
|
|
65
65
|
}),
|
|
66
66
|
/* @__PURE__ */ c("div", {
|
|
67
67
|
className: "ttw:min-w-0",
|
|
@@ -70,10 +70,10 @@ var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g
|
|
|
70
70
|
options: p,
|
|
71
71
|
lockedSections: e.lockedSections,
|
|
72
72
|
lockedOptions: e.lockedOptions,
|
|
73
|
-
onChange: (t) =>
|
|
73
|
+
onChange: (t) => T(e.id, t),
|
|
74
74
|
disabled: y,
|
|
75
75
|
error: _?.steps?.[e.id],
|
|
76
|
-
labels:
|
|
76
|
+
labels: w,
|
|
77
77
|
testId: `approver-group-picker-${e.id}`
|
|
78
78
|
})
|
|
79
79
|
}),
|
|
@@ -81,7 +81,7 @@ var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g
|
|
|
81
81
|
type: "button",
|
|
82
82
|
variant: "ghost",
|
|
83
83
|
size: "icon-sm",
|
|
84
|
-
"aria-label":
|
|
84
|
+
"aria-label": w.RemoveGroupAriaLabel,
|
|
85
85
|
onClick: () => g(e.id),
|
|
86
86
|
disabled: y,
|
|
87
87
|
"data-testid": `approver-group-remove-${e.id}`,
|
|
@@ -94,9 +94,9 @@ var f = ({ steps: f, options: p, onStepsChange: m, onAddStep: h, onRemoveStep: g
|
|
|
94
94
|
variant: "link",
|
|
95
95
|
onClick: h,
|
|
96
96
|
disabled: y || v,
|
|
97
|
-
"data-testid":
|
|
97
|
+
"data-testid": C?.addStepButton,
|
|
98
98
|
className: "ttw:w-fit ttw:px-0",
|
|
99
|
-
children: [/* @__PURE__ */ c(u, {}),
|
|
99
|
+
children: [/* @__PURE__ */ c(u, {}), w.AddGroupButton]
|
|
100
100
|
})
|
|
101
101
|
]
|
|
102
102
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Fragment as u, useMemo as d } from "react";
|
|
|
6
6
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
7
|
import { SquarePen as m, Trash2 as h } from "lucide-react";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js
|
|
9
|
-
var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, amountCondition: x, onAmountConditionChange: S, onAmountFieldBlur: C, amountConditionErrors: w, onApproverStepsChange: T, onAddApproverStep: E, onRemoveApproverStep: D, approverErrors: O, addApproverStepDisabled: k, isEditing: A, onEdit: j, onCancel: M, onSave: N, onDelete: P, saveDisabled: F, saveDisabledReasons: I, disabled: L, labels: R, ref: z }) => {
|
|
10
|
-
let
|
|
9
|
+
var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, amountCondition: x, onAmountConditionChange: S, onAmountFieldBlur: C, amountConditionErrors: w, onApproverStepsChange: T, onAddApproverStep: E, onRemoveApproverStep: D, approverErrors: O, addApproverStepDisabled: k, isEditing: A, onEdit: j, onCancel: M, onSave: N, onDelete: P, saveDisabled: F, saveDisabledReasons: I, disabled: L, labels: R, ref: z, testIds: B }) => {
|
|
10
|
+
let V = d(() => ({
|
|
11
11
|
...l,
|
|
12
12
|
...R,
|
|
13
13
|
AmountConditionBuilder: {
|
|
@@ -18,13 +18,13 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
18
18
|
...l.ApproverGroupsBuilder,
|
|
19
19
|
...R?.ApproverGroupsBuilder
|
|
20
20
|
}
|
|
21
|
-
}), [R]),
|
|
21
|
+
}), [R]), H = /* @__PURE__ */ f(t, {
|
|
22
22
|
type: "button",
|
|
23
23
|
onClick: N,
|
|
24
24
|
disabled: L || F,
|
|
25
25
|
"data-testid": `policy-card-save-button-${g}`,
|
|
26
|
-
children:
|
|
27
|
-
}),
|
|
26
|
+
children: V.Save
|
|
27
|
+
}), U = {
|
|
28
28
|
steps: y,
|
|
29
29
|
options: b,
|
|
30
30
|
onStepsChange: T,
|
|
@@ -33,7 +33,8 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
33
33
|
errors: O,
|
|
34
34
|
addStepDisabled: k,
|
|
35
35
|
disabled: L,
|
|
36
|
-
labels:
|
|
36
|
+
labels: V.ApproverGroupsBuilder,
|
|
37
|
+
testIds: B?.approverGroupsBuilder
|
|
37
38
|
};
|
|
38
39
|
return /* @__PURE__ */ p("div", {
|
|
39
40
|
ref: z,
|
|
@@ -48,7 +49,7 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
48
49
|
type: "button",
|
|
49
50
|
variant: "ghost",
|
|
50
51
|
size: "icon-sm",
|
|
51
|
-
"aria-label":
|
|
52
|
+
"aria-label": V.EditAriaLabel,
|
|
52
53
|
onClick: j,
|
|
53
54
|
disabled: L,
|
|
54
55
|
"data-testid": `policy-card-edit-button-${g}`,
|
|
@@ -63,9 +64,10 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
63
64
|
onFieldBlur: C,
|
|
64
65
|
errors: w,
|
|
65
66
|
disabled: L,
|
|
66
|
-
labels:
|
|
67
|
+
labels: V.AmountConditionBuilder,
|
|
68
|
+
testIds: B?.amountConditionBuilder
|
|
67
69
|
}),
|
|
68
|
-
/* @__PURE__ */ f(c, { ...
|
|
70
|
+
/* @__PURE__ */ f(c, { ...U }),
|
|
69
71
|
/* @__PURE__ */ p("div", {
|
|
70
72
|
className: "ttw:flex ttw:items-center ttw:gap-4 ttw:pt-2",
|
|
71
73
|
children: [P ? /* @__PURE__ */ p(t, {
|
|
@@ -75,7 +77,7 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
75
77
|
disabled: L,
|
|
76
78
|
className: "ttw:w-fit ttw:px-0 ttw:text-destructive ttw:hover:text-destructive",
|
|
77
79
|
"data-testid": `policy-card-delete-button-${g}`,
|
|
78
|
-
children: [/* @__PURE__ */ f(h, {}),
|
|
80
|
+
children: [/* @__PURE__ */ f(h, {}), V.Delete]
|
|
79
81
|
}) : null, /* @__PURE__ */ p("div", {
|
|
80
82
|
className: "ttw:ml-auto ttw:flex ttw:items-center ttw:gap-2",
|
|
81
83
|
children: [/* @__PURE__ */ f(t, {
|
|
@@ -84,20 +86,20 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
84
86
|
onClick: M,
|
|
85
87
|
disabled: L,
|
|
86
88
|
"data-testid": `policy-card-cancel-button-${g}`,
|
|
87
|
-
children:
|
|
89
|
+
children: V.Cancel
|
|
88
90
|
}), F && I?.length ? /* @__PURE__ */ f(i, { children: /* @__PURE__ */ p(n, { children: [/* @__PURE__ */ f(a, {
|
|
89
91
|
asChild: !0,
|
|
90
92
|
children: /* @__PURE__ */ f("span", {
|
|
91
93
|
tabIndex: 0,
|
|
92
94
|
className: "ttw:inline-flex ttw:cursor-not-allowed ttw:rounded-md",
|
|
93
95
|
"data-testid": `policy-card-save-blocked-${g}`,
|
|
94
|
-
children:
|
|
96
|
+
children: H
|
|
95
97
|
})
|
|
96
98
|
}), /* @__PURE__ */ f(r, {
|
|
97
99
|
side: "top",
|
|
98
100
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
99
101
|
children: I.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
|
|
100
|
-
})] }) }) :
|
|
102
|
+
})] }) }) : H]
|
|
101
103
|
})]
|
|
102
104
|
})
|
|
103
105
|
]
|
|
@@ -113,14 +115,14 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
|
|
|
113
115
|
children: [/* @__PURE__ */ f(o, {
|
|
114
116
|
variant: "caption",
|
|
115
117
|
color: "muted",
|
|
116
|
-
children:
|
|
118
|
+
children: V.GroupConnector
|
|
117
119
|
}), /* @__PURE__ */ f("div", { className: "ttw:h-px ttw:flex-1 ttw:bg-border" })]
|
|
118
120
|
}) : null, /* @__PURE__ */ f("div", {
|
|
119
121
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1.5",
|
|
120
122
|
children: t.selectedItems.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ f(o, {
|
|
121
123
|
variant: "body2",
|
|
122
124
|
color: "muted",
|
|
123
|
-
children:
|
|
125
|
+
children: V.ApproverConnector
|
|
124
126
|
}) : null, /* @__PURE__ */ f(e, {
|
|
125
127
|
variant: "outline",
|
|
126
128
|
children: t.label
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js
CHANGED
|
@@ -4,8 +4,8 @@ import { useMemo as c } from "react";
|
|
|
4
4
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
import { Trash2 as d } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js
|
|
7
|
-
var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, labels: _ }) => {
|
|
8
|
-
let
|
|
7
|
+
var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, labels: _, testIds: v }) => {
|
|
8
|
+
let y = c(() => ({
|
|
9
9
|
...s,
|
|
10
10
|
..._
|
|
11
11
|
}), [_]);
|
|
@@ -13,7 +13,7 @@ var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, l
|
|
|
13
13
|
open: f,
|
|
14
14
|
onOpenChange: p,
|
|
15
15
|
children: /* @__PURE__ */ u(t, {
|
|
16
|
-
"data-testid":
|
|
16
|
+
"data-testid": v?.root,
|
|
17
17
|
className: "ttw:sm:max-w-sm",
|
|
18
18
|
children: [/* @__PURE__ */ u(i, {
|
|
19
19
|
className: "ttw:items-center ttw:text-center",
|
|
@@ -25,8 +25,8 @@ var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, l
|
|
|
25
25
|
"aria-hidden": "true"
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
28
|
-
/* @__PURE__ */ l(a, { children:
|
|
29
|
-
/* @__PURE__ */ l(n, { children:
|
|
28
|
+
/* @__PURE__ */ l(a, { children: y.Title }),
|
|
29
|
+
/* @__PURE__ */ l(n, { children: y.Description })
|
|
30
30
|
]
|
|
31
31
|
}), /* @__PURE__ */ u(r, {
|
|
32
32
|
className: "ttw:sm:justify-center",
|
|
@@ -36,8 +36,8 @@ var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, l
|
|
|
36
36
|
onClick: h,
|
|
37
37
|
disabled: g,
|
|
38
38
|
className: "ttw:flex-1",
|
|
39
|
-
"data-testid":
|
|
40
|
-
children:
|
|
39
|
+
"data-testid": v?.cancelButton,
|
|
40
|
+
children: y.Cancel
|
|
41
41
|
}), /* @__PURE__ */ u(o, {
|
|
42
42
|
type: "button",
|
|
43
43
|
variant: "destructive",
|
|
@@ -45,8 +45,8 @@ var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, l
|
|
|
45
45
|
disabled: g,
|
|
46
46
|
loading: g,
|
|
47
47
|
className: "ttw:flex-1",
|
|
48
|
-
"data-testid":
|
|
49
|
-
children: [/* @__PURE__ */ l(d, {}),
|
|
48
|
+
"data-testid": v?.confirmButton,
|
|
49
|
+
children: [/* @__PURE__ */ l(d, {}), y.Delete]
|
|
50
50
|
})]
|
|
51
51
|
})]
|
|
52
52
|
})
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js
CHANGED
|
@@ -7,8 +7,8 @@ import { ApprovalPoliciesListDefaultLabels as a } from "./index19.js";
|
|
|
7
7
|
import { useMemo as o } from "react";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js
|
|
10
|
-
var l = ({ items: l, editingId: u, onAddRule: d, gaps: f, onSelectGap: p, unlistedPoliciesHeading: m, unlistedPoliciesBlockAmounts: h, unlistedPoliciesStillApply: g, createRuleDisabledReason: _, isLoading: v, disabled: y, labels: b }) => {
|
|
11
|
-
let
|
|
10
|
+
var l = ({ items: l, editingId: u, onAddRule: d, gaps: f, onSelectGap: p, unlistedPoliciesHeading: m, unlistedPoliciesBlockAmounts: h, unlistedPoliciesStillApply: g, createRuleDisabledReason: _, isLoading: v, disabled: y, labels: b, testIds: x }) => {
|
|
11
|
+
let S = o(() => ({
|
|
12
12
|
...a,
|
|
13
13
|
...b,
|
|
14
14
|
GapCoverageAlert: {
|
|
@@ -23,14 +23,15 @@ var l = ({ items: l, editingId: u, onAddRule: d, gaps: f, onSelectGap: p, unlist
|
|
|
23
23
|
...a.UnlistedPoliciesNotice,
|
|
24
24
|
...b?.UnlistedPoliciesNotice
|
|
25
25
|
}
|
|
26
|
-
}), [b]),
|
|
26
|
+
}), [b]), C = m ? /* @__PURE__ */ s(r, {
|
|
27
27
|
heading: m,
|
|
28
28
|
showAmountsBlocked: h,
|
|
29
29
|
showStillApply: g,
|
|
30
|
-
labels:
|
|
30
|
+
labels: S.UnlistedPoliciesNotice,
|
|
31
|
+
testIds: x?.unlistedPoliciesNotice
|
|
31
32
|
}) : null;
|
|
32
33
|
if (v && l.length === 0) return /* @__PURE__ */ s("div", {
|
|
33
|
-
"data-testid":
|
|
34
|
+
"data-testid": x?.loading,
|
|
34
35
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
35
36
|
children: Array.from({ length: 2 }).map((t, n) => /* @__PURE__ */ c("div", {
|
|
36
37
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
@@ -46,20 +47,21 @@ var l = ({ items: l, editingId: u, onAddRule: d, gaps: f, onSelectGap: p, unlist
|
|
|
46
47
|
});
|
|
47
48
|
if (l.length === 0) return /* @__PURE__ */ c("div", {
|
|
48
49
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
49
|
-
children: [
|
|
50
|
+
children: [C, /* @__PURE__ */ s(t, {
|
|
50
51
|
onCreateRule: d,
|
|
51
52
|
disabled: y || _ !== void 0,
|
|
52
53
|
createRuleDisabledReason: _,
|
|
53
54
|
hasUnlistedRules: m !== void 0,
|
|
54
|
-
labels:
|
|
55
|
+
labels: S.NoPolicyBanner,
|
|
56
|
+
testIds: x?.noPolicyBanner
|
|
55
57
|
})]
|
|
56
58
|
});
|
|
57
|
-
let
|
|
59
|
+
let w = u !== null;
|
|
58
60
|
return /* @__PURE__ */ c("div", {
|
|
59
|
-
"data-testid":
|
|
61
|
+
"data-testid": x?.root,
|
|
60
62
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
61
63
|
children: [
|
|
62
|
-
|
|
64
|
+
C,
|
|
63
65
|
/* @__PURE__ */ s("div", {
|
|
64
66
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
65
67
|
children: l.map((e) => {
|
|
@@ -67,15 +69,16 @@ var l = ({ items: l, editingId: u, onAddRule: d, gaps: f, onSelectGap: p, unlist
|
|
|
67
69
|
return /* @__PURE__ */ s(i, {
|
|
68
70
|
...e,
|
|
69
71
|
isEditing: t,
|
|
70
|
-
disabled: y ||
|
|
72
|
+
disabled: y || w && !t
|
|
71
73
|
}, e.id);
|
|
72
74
|
})
|
|
73
75
|
}),
|
|
74
76
|
f.length > 0 ? /* @__PURE__ */ s(n, {
|
|
75
77
|
gaps: f,
|
|
76
78
|
onSelectGap: p,
|
|
77
|
-
disabled: y ||
|
|
78
|
-
labels:
|
|
79
|
+
disabled: y || w,
|
|
80
|
+
labels: S.GapCoverageAlert,
|
|
81
|
+
testIds: x?.gapCoverageAlert
|
|
79
82
|
}) : null
|
|
80
83
|
]
|
|
81
84
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js
CHANGED
|
@@ -50,19 +50,19 @@ function p({ value: r, onChange: a, onBlur: o, currencySymbol: c, placeholder: p
|
|
|
50
50
|
]
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels: l }) => {
|
|
54
|
-
let
|
|
53
|
+
var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels: l, testIds: f }) => {
|
|
54
|
+
let m = c(() => ({
|
|
55
55
|
...o,
|
|
56
56
|
...l
|
|
57
57
|
}), [l]);
|
|
58
58
|
return /* @__PURE__ */ u(r, { children: /* @__PURE__ */ d("div", {
|
|
59
|
-
"data-testid":
|
|
59
|
+
"data-testid": f?.root,
|
|
60
60
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ u(a, {
|
|
63
63
|
variant: "body2",
|
|
64
64
|
className: "ttw:font-medium",
|
|
65
|
-
children:
|
|
65
|
+
children: m.IfAmountIsBetween
|
|
66
66
|
}),
|
|
67
67
|
/* @__PURE__ */ u(p, {
|
|
68
68
|
value: e.lower,
|
|
@@ -71,17 +71,17 @@ var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels
|
|
|
71
71
|
lower: n
|
|
72
72
|
}),
|
|
73
73
|
onBlur: n ? () => n("lower") : void 0,
|
|
74
|
-
currencySymbol:
|
|
75
|
-
placeholder:
|
|
74
|
+
currencySymbol: m.CurrencySymbol,
|
|
75
|
+
placeholder: m.LowerPlaceholder,
|
|
76
76
|
error: i?.lower,
|
|
77
77
|
disabled: s,
|
|
78
|
-
ariaLabel:
|
|
79
|
-
testId:
|
|
78
|
+
ariaLabel: m.LowerAmountAriaLabel,
|
|
79
|
+
testId: f?.lowerInput
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ u(a, {
|
|
82
82
|
variant: "body2",
|
|
83
83
|
className: "ttw:font-medium",
|
|
84
|
-
children:
|
|
84
|
+
children: m.And
|
|
85
85
|
}),
|
|
86
86
|
/* @__PURE__ */ u(p, {
|
|
87
87
|
value: e.upper,
|
|
@@ -90,12 +90,12 @@ var m = ({ value: e, onChange: t, onFieldBlur: n, errors: i, disabled: s, labels
|
|
|
90
90
|
upper: n
|
|
91
91
|
}),
|
|
92
92
|
onBlur: n ? () => n("upper") : void 0,
|
|
93
|
-
currencySymbol:
|
|
94
|
-
placeholder:
|
|
93
|
+
currencySymbol: m.CurrencySymbol,
|
|
94
|
+
placeholder: m.UpperPlaceholder,
|
|
95
95
|
error: i?.upper,
|
|
96
96
|
disabled: s,
|
|
97
|
-
ariaLabel:
|
|
98
|
-
testId:
|
|
97
|
+
ariaLabel: m.UpperAmountAriaLabel,
|
|
98
|
+
testId: f?.upperInput
|
|
99
99
|
})
|
|
100
100
|
]
|
|
101
101
|
}) });
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js
CHANGED
|
@@ -4,46 +4,46 @@ import { useMemo as s } from "react";
|
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
5
|
import { PlusIcon as u } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js
|
|
7
|
-
var d = ({ onCreateRule: d, disabled: f, createRuleDisabledReason: p, hasUnlistedRules: m, labels: h }) => {
|
|
8
|
-
let
|
|
7
|
+
var d = ({ onCreateRule: d, disabled: f, createRuleDisabledReason: p, hasUnlistedRules: m, labels: h, testIds: g }) => {
|
|
8
|
+
let _ = s(() => ({
|
|
9
9
|
...o,
|
|
10
10
|
...h
|
|
11
|
-
}), [h]),
|
|
11
|
+
}), [h]), v = /* @__PURE__ */ l(e, {
|
|
12
12
|
type: "button",
|
|
13
13
|
onClick: d,
|
|
14
14
|
disabled: f,
|
|
15
|
-
"data-testid":
|
|
15
|
+
"data-testid": g?.createRuleButton,
|
|
16
16
|
className: "ttw:mt-2",
|
|
17
|
-
children: [/* @__PURE__ */ c(u, {}),
|
|
17
|
+
children: [/* @__PURE__ */ c(u, {}), _.CreateRule]
|
|
18
18
|
});
|
|
19
19
|
return /* @__PURE__ */ c("div", {
|
|
20
|
-
"data-testid":
|
|
20
|
+
"data-testid": g?.root,
|
|
21
21
|
className: "ttw:w-full ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:py-10",
|
|
22
22
|
children: /* @__PURE__ */ l("div", {
|
|
23
23
|
className: "ttw:mx-auto ttw:flex ttw:max-w-[600px] ttw:flex-col ttw:items-center ttw:gap-2 ttw:px-6",
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ c(a, {
|
|
26
26
|
variant: "h5",
|
|
27
|
-
children: m ?
|
|
27
|
+
children: m ? _.TitleWithUnlistedRules : _.Title
|
|
28
28
|
}),
|
|
29
29
|
/* @__PURE__ */ c(a, {
|
|
30
30
|
variant: "body2",
|
|
31
31
|
color: "muted",
|
|
32
32
|
className: "ttw:text-center",
|
|
33
|
-
children: m ?
|
|
33
|
+
children: m ? _.BodyWithUnlistedRules : _.Body
|
|
34
34
|
}),
|
|
35
35
|
f && p ? /* @__PURE__ */ c(r, { children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ c(i, {
|
|
36
36
|
asChild: !0,
|
|
37
37
|
children: /* @__PURE__ */ c("span", {
|
|
38
38
|
tabIndex: 0,
|
|
39
39
|
className: "ttw:inline-flex ttw:cursor-not-allowed ttw:rounded-md",
|
|
40
|
-
"data-testid":
|
|
41
|
-
children:
|
|
40
|
+
"data-testid": g?.createRuleBlocked,
|
|
41
|
+
children: v
|
|
42
42
|
})
|
|
43
43
|
}), /* @__PURE__ */ c(n, {
|
|
44
44
|
side: "top",
|
|
45
45
|
children: p
|
|
46
|
-
})] }) }) :
|
|
46
|
+
})] }) }) : v
|
|
47
47
|
]
|
|
48
48
|
})
|
|
49
49
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js
CHANGED
|
@@ -4,13 +4,13 @@ import { useMemo as a } from "react";
|
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowRight as c, Info as l } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js
|
|
7
|
-
var u = ({ gaps: u, onSelectGap: d, disabled: f, labels: p }) => {
|
|
8
|
-
let
|
|
7
|
+
var u = ({ gaps: u, onSelectGap: d, disabled: f, labels: p, testIds: m }) => {
|
|
8
|
+
let h = a(() => ({
|
|
9
9
|
...i,
|
|
10
10
|
...p
|
|
11
11
|
}), [p]);
|
|
12
12
|
return /* @__PURE__ */ s("div", {
|
|
13
|
-
"data-testid":
|
|
13
|
+
"data-testid": m?.root,
|
|
14
14
|
role: "status",
|
|
15
15
|
className: "ttw:w-full ttw:rounded-lg ttw:border ttw:border-orange-400 ttw:bg-orange-50 ttw:px-4 ttw:py-3 ttw:text-sm ttw:text-orange-950",
|
|
16
16
|
children: [
|
|
@@ -21,7 +21,7 @@ var u = ({ gaps: u, onSelectGap: d, disabled: f, labels: p }) => {
|
|
|
21
21
|
className: "ttw:size-4 ttw:shrink-0"
|
|
22
22
|
}), /* @__PURE__ */ o("span", {
|
|
23
23
|
className: "ttw:font-medium",
|
|
24
|
-
children:
|
|
24
|
+
children: h.Title
|
|
25
25
|
})]
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ o("ul", {
|
|
@@ -49,7 +49,7 @@ var u = ({ gaps: u, onSelectGap: d, disabled: f, labels: p }) => {
|
|
|
49
49
|
})] }) }) : a }, i.id);
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
|
-
/* @__PURE__ */ o("p", { children:
|
|
52
|
+
/* @__PURE__ */ o("p", { children: h.Footer })
|
|
53
53
|
]
|
|
54
54
|
});
|
|
55
55
|
};
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js
CHANGED
|
@@ -3,13 +3,13 @@ import { useMemo as t } from "react";
|
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { Info as i } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index9.js
|
|
6
|
-
var a = ({ heading: a, showAmountsBlocked: o, showStillApply: s, labels: c }) => {
|
|
7
|
-
let
|
|
6
|
+
var a = ({ heading: a, showAmountsBlocked: o, showStillApply: s, labels: c, testIds: l }) => {
|
|
7
|
+
let u = t(() => ({
|
|
8
8
|
...e,
|
|
9
9
|
...c
|
|
10
10
|
}), [c]);
|
|
11
11
|
return /* @__PURE__ */ r("div", {
|
|
12
|
-
"data-testid":
|
|
12
|
+
"data-testid": l?.root,
|
|
13
13
|
role: "status",
|
|
14
14
|
className: "ttw:w-full ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted ttw:px-4 ttw:py-3 ttw:text-sm ttw:text-muted-foreground",
|
|
15
15
|
children: [/* @__PURE__ */ r("div", {
|
|
@@ -24,9 +24,9 @@ var a = ({ heading: a, showAmountsBlocked: o, showStillApply: s, labels: c }) =>
|
|
|
24
24
|
}), /* @__PURE__ */ n("p", {
|
|
25
25
|
className: "ttw:mt-1 ttw:pl-6",
|
|
26
26
|
children: [
|
|
27
|
-
|
|
28
|
-
s ?
|
|
29
|
-
o ?
|
|
27
|
+
u.Description,
|
|
28
|
+
s ? u.StillApply : void 0,
|
|
29
|
+
o ? u.AmountsBlocked : void 0
|
|
30
30
|
].filter(Boolean).join(" ")
|
|
31
31
|
})]
|
|
32
32
|
});
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.3.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.3.18", n = "e0037fe856983b9358ba93d959a2a52c849dd654", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -10,41 +10,41 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
|
10
10
|
import { useControllableState as g } from "@radix-ui/react-use-controllable-state";
|
|
11
11
|
import { Check as _, X as v } from "lucide-react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
|
|
13
|
-
function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle: C, stepLabels: w, activeStep: T, disclaimerText: E, onBack: D, onNext: O, onCancel: k, isBackDisabled: A = !1, showDismissButton: j = !0, isNextDisabled: M = !1, isNextLoading: N = !1, nextLabel: P, nextIcon: F, errorMessage: I, children: L, labels: R }) {
|
|
14
|
-
let
|
|
13
|
+
function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle: C, stepLabels: w, activeStep: T, disclaimerText: E, onBack: D, onNext: O, onCancel: k, isBackDisabled: A = !1, showDismissButton: j = !0, isNextDisabled: M = !1, isNextLoading: N = !1, nextLabel: P, nextIcon: F, errorMessage: I, children: L, labels: R, testIds: z }) {
|
|
14
|
+
let B = {
|
|
15
15
|
...c,
|
|
16
16
|
...R
|
|
17
|
-
}, [
|
|
17
|
+
}, [V, H] = g({
|
|
18
18
|
prop: y,
|
|
19
19
|
defaultProp: b,
|
|
20
20
|
onChange: x
|
|
21
|
-
}), [
|
|
22
|
-
|
|
23
|
-
}, []),
|
|
21
|
+
}), [U, W] = p.useState(null), G = p.useCallback((e) => {
|
|
22
|
+
W(e);
|
|
23
|
+
}, []), K = !N && (F === void 0 ? /* @__PURE__ */ m(_, {
|
|
24
24
|
className: "ttw:size-5",
|
|
25
25
|
"aria-hidden": !0
|
|
26
26
|
}) : F);
|
|
27
27
|
return /* @__PURE__ */ m(t, {
|
|
28
|
-
open:
|
|
29
|
-
onOpenChange:
|
|
28
|
+
open: V,
|
|
29
|
+
onOpenChange: H,
|
|
30
30
|
children: /* @__PURE__ */ m(u.Provider, {
|
|
31
|
-
value:
|
|
31
|
+
value: U,
|
|
32
32
|
children: /* @__PURE__ */ m(r, {
|
|
33
33
|
className: "ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
|
|
34
|
-
"data-testid":
|
|
34
|
+
"data-testid": z?.root,
|
|
35
35
|
children: /* @__PURE__ */ h("div", {
|
|
36
|
-
ref:
|
|
36
|
+
ref: G,
|
|
37
37
|
className: "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
|
|
38
38
|
children: [
|
|
39
39
|
j ? /* @__PURE__ */ h(n, {
|
|
40
40
|
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
|
|
41
|
-
"data-testid":
|
|
41
|
+
"data-testid": z?.dismiss,
|
|
42
42
|
children: [/* @__PURE__ */ m(v, {
|
|
43
43
|
className: "ttw:size-4",
|
|
44
44
|
"aria-hidden": !0
|
|
45
45
|
}), /* @__PURE__ */ m("span", {
|
|
46
46
|
className: "ttw:sr-only",
|
|
47
|
-
children:
|
|
47
|
+
children: B.dismissAriaLabel
|
|
48
48
|
})]
|
|
49
49
|
}) : null,
|
|
50
50
|
/* @__PURE__ */ h("header", {
|
|
@@ -67,7 +67,8 @@ function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle:
|
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ m(f, {
|
|
69
69
|
activeStep: T,
|
|
70
|
-
scrollForMoreLabel:
|
|
70
|
+
scrollForMoreLabel: B.scrollForMore,
|
|
71
|
+
testIds: z?.scrollRegion,
|
|
71
72
|
children: L
|
|
72
73
|
}),
|
|
73
74
|
/* @__PURE__ */ h("footer", {
|
|
@@ -93,8 +94,8 @@ function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle:
|
|
|
93
94
|
disabled: A || N,
|
|
94
95
|
onClick: D,
|
|
95
96
|
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
96
|
-
"data-testid":
|
|
97
|
-
children:
|
|
97
|
+
"data-testid": z?.back,
|
|
98
|
+
children: B.backButton
|
|
98
99
|
}), /* @__PURE__ */ h("div", {
|
|
99
100
|
className: "ttw:flex ttw:items-center ttw:gap-3",
|
|
100
101
|
children: [k ? /* @__PURE__ */ m(e, {
|
|
@@ -103,16 +104,16 @@ function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle:
|
|
|
103
104
|
disabled: N,
|
|
104
105
|
onClick: k,
|
|
105
106
|
className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
|
|
106
|
-
"data-testid":
|
|
107
|
-
children:
|
|
107
|
+
"data-testid": z?.cancel,
|
|
108
|
+
children: B.cancelButton
|
|
108
109
|
}) : null, /* @__PURE__ */ h(e, {
|
|
109
110
|
type: "button",
|
|
110
111
|
disabled: M || N,
|
|
111
112
|
loading: N,
|
|
112
113
|
onClick: O,
|
|
113
114
|
className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
|
|
114
|
-
"data-testid":
|
|
115
|
-
children: [P,
|
|
115
|
+
"data-testid": z?.next,
|
|
116
|
+
children: [P, K]
|
|
116
117
|
})]
|
|
117
118
|
})]
|
|
118
119
|
})
|