@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/expense-management-widget/feature/dist/index8.js
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
-
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
-
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import { ExpenseManagementWidgetUi as n } from "../../ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js";
|
|
9
|
-
import "../../ui/dist/index.js";
|
|
10
|
-
import { ExpenseApprovalPoliciesWidget as r } from "./index5.js";
|
|
11
|
-
import { UploadReceiptWidget as i } from "./index6.js";
|
|
12
|
-
import { ExpenseManagementWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "./index7.js";
|
|
13
|
-
import { ExpenseRequirementsWidget as s } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
14
|
-
import "../../../expense-requirements-widget/feature/dist/index.js";
|
|
15
|
-
import { useEffect as c } from "react";
|
|
16
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
17
1
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js
|
|
18
|
-
|
|
19
|
-
let m = e();
|
|
20
|
-
return c(() => {
|
|
21
|
-
m(a.Mounted);
|
|
22
|
-
}, [m]), /* @__PURE__ */ l(n, {
|
|
23
|
-
labels: t,
|
|
24
|
-
receiptsContent: u ?? (o ? /* @__PURE__ */ l(i, { ...o }) : null),
|
|
25
|
-
matchingContent: d,
|
|
26
|
-
policiesContent: f ?? /* @__PURE__ */ l(r, {}),
|
|
27
|
-
requirementsContent: p ?? /* @__PURE__ */ l(s, {})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, ...g }) {
|
|
31
|
-
return /* @__PURE__ */ l(t, {
|
|
32
|
-
widgetName: o,
|
|
33
|
-
baseUrl: e,
|
|
34
|
-
widgetToken: n,
|
|
35
|
-
organizationId: r,
|
|
36
|
-
configClient: i,
|
|
37
|
-
gatewayRouting: a,
|
|
38
|
-
linkComponent: s,
|
|
39
|
-
implementation: c,
|
|
40
|
-
uiFramework: d,
|
|
41
|
-
errorFallback: f,
|
|
42
|
-
onError: p,
|
|
43
|
-
analytics: m,
|
|
44
|
-
disclosuresAcceptance: h,
|
|
45
|
-
children: /* @__PURE__ */ l(u, { ...g })
|
|
46
|
-
});
|
|
47
|
-
}
|
|
2
|
+
var e = { Mounted: "expense_management_widget.mounted" }, t = "expense_management_widget";
|
|
48
3
|
//#endregion
|
|
49
|
-
export {
|
|
4
|
+
export { e as ExpenseManagementWidgetAnalyticsEvent, t as WIDGET_NAME };
|
package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js
CHANGED
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
+
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
+
import "../../../shared/feature/dist/index.js";
|
|
8
|
+
import { ExpenseManagementWidgetUi as n } from "../../ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js";
|
|
9
|
+
import "../../ui/dist/index.js";
|
|
10
|
+
import { ExpenseApprovalPoliciesWidget as r } from "./index6.js";
|
|
11
|
+
import { UploadReceiptWidget as i } from "./index7.js";
|
|
12
|
+
import { ExpenseManagementWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "./index8.js";
|
|
13
|
+
import { ExpenseRequirementsWidget as s } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
14
|
+
import "../../../expense-requirements-widget/feature/dist/index.js";
|
|
15
|
+
import { useEffect as c } from "react";
|
|
16
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
17
|
+
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js
|
|
18
|
+
function u({ labels: t, receiptUpload: o, receiptsContent: u, matchingContent: d, policiesContent: f, requirementsContent: p }) {
|
|
19
|
+
let m = e();
|
|
20
|
+
return c(() => {
|
|
21
|
+
m(a.Mounted);
|
|
22
|
+
}, [m]), /* @__PURE__ */ l(n, {
|
|
23
|
+
labels: t,
|
|
24
|
+
receiptsContent: u ?? (o ? /* @__PURE__ */ l(i, { ...o }) : null),
|
|
25
|
+
matchingContent: d,
|
|
26
|
+
policiesContent: f ?? /* @__PURE__ */ l(r, {}),
|
|
27
|
+
requirementsContent: p ?? /* @__PURE__ */ l(s, {})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, ...g }) {
|
|
31
|
+
return /* @__PURE__ */ l(t, {
|
|
32
|
+
widgetName: o,
|
|
33
|
+
baseUrl: e,
|
|
34
|
+
widgetToken: n,
|
|
35
|
+
organizationId: r,
|
|
36
|
+
configClient: i,
|
|
37
|
+
gatewayRouting: a,
|
|
38
|
+
linkComponent: s,
|
|
39
|
+
implementation: c,
|
|
40
|
+
uiFramework: d,
|
|
41
|
+
errorFallback: f,
|
|
42
|
+
onError: p,
|
|
43
|
+
analytics: m,
|
|
44
|
+
disclosuresAcceptance: h,
|
|
45
|
+
children: /* @__PURE__ */ l(u, { ...g })
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { d as ExpenseManagementWidget, d as default };
|
|
@@ -33,8 +33,8 @@ function f({ conditionType: e, minAmount: t, maxAmount: r }) {
|
|
|
33
33
|
default: return /* @__PURE__ */ c(o, { children: ["For all ", /* @__PURE__ */ s("strong", { children: "expenses" })] });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
var p = ({ rule: n, onEdit: a, onDelete: o, disabled: p }) => /* @__PURE__ */ c("div", {
|
|
37
|
-
"data-testid":
|
|
36
|
+
var p = ({ rule: n, onEdit: a, onDelete: o, disabled: p, testIds: m }) => /* @__PURE__ */ c("div", {
|
|
37
|
+
"data-testid": m?.root,
|
|
38
38
|
className: "ttw:border ttw:border-border ttw:rounded-lg ttw:p-4 ttw:flex ttw:flex-col ttw:gap-2",
|
|
39
39
|
children: [/* @__PURE__ */ c("div", {
|
|
40
40
|
className: "ttw:flex ttw:items-center ttw:justify-between",
|
|
@@ -34,28 +34,28 @@ function v({ value: e, onChange: t, onBlur: a, placeholder: s, error: c, disable
|
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, disabled: m, isSaveDisabled: y, onValuesChange: b, onSave: x, onCancel: S, onDelete: C }) => {
|
|
38
|
-
let
|
|
37
|
+
var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, disabled: m, isSaveDisabled: y, onValuesChange: b, onSave: x, onCancel: S, onDelete: C, testIds: w }) => {
|
|
38
|
+
let T = (e) => b({
|
|
39
39
|
...n,
|
|
40
40
|
...e
|
|
41
|
-
}), [
|
|
41
|
+
}), [E, D] = d({}), [O, k] = d(!1), A = (e) => D((t) => ({
|
|
42
42
|
...t,
|
|
43
43
|
[e]: !0
|
|
44
|
-
})),
|
|
45
|
-
minAmount:
|
|
46
|
-
maxAmount:
|
|
47
|
-
approvers:
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
44
|
+
})), j = {
|
|
45
|
+
minAmount: E.minAmount || O ? i.minAmount : void 0,
|
|
46
|
+
maxAmount: E.maxAmount || O ? i.maxAmount : void 0,
|
|
47
|
+
approvers: O ? i.approvers : void 0
|
|
48
|
+
}, M = () => {
|
|
49
|
+
k(!0), !(i.minAmount || i.maxAmount || i.approvers) && x();
|
|
50
|
+
}, N = u(), P = r.map((e) => ({
|
|
51
51
|
value: e.id,
|
|
52
52
|
label: e.label
|
|
53
|
-
})),
|
|
53
|
+
})), F = new Set(P.map((e) => e.value)), I = [...P, ...n.approvers.filter((e) => !F.has(e.id)).map((e) => ({
|
|
54
54
|
value: e.id,
|
|
55
55
|
label: e.label
|
|
56
|
-
}))],
|
|
56
|
+
}))], L = new Map([...n.approvers.map((e) => [e.id, e]), ...r.map((e) => [e.id, e])]);
|
|
57
57
|
return /* @__PURE__ */ p("div", {
|
|
58
|
-
"data-testid":
|
|
58
|
+
"data-testid": w?.root,
|
|
59
59
|
className: "ttw:border ttw:border-border ttw:rounded-lg ttw:p-5 ttw:flex ttw:flex-col ttw:gap-4",
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ f(a, { children: /* @__PURE__ */ p("div", {
|
|
@@ -73,12 +73,12 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
73
73
|
}),
|
|
74
74
|
/* @__PURE__ */ f(v, {
|
|
75
75
|
value: n.minAmount,
|
|
76
|
-
onChange: (e) =>
|
|
77
|
-
onBlur: () =>
|
|
76
|
+
onChange: (e) => T({ minAmount: e }),
|
|
77
|
+
onBlur: () => A("minAmount"),
|
|
78
78
|
placeholder: l.MinimumPlaceholder,
|
|
79
|
-
error:
|
|
79
|
+
error: j.minAmount,
|
|
80
80
|
disabled: m,
|
|
81
|
-
testId:
|
|
81
|
+
testId: w?.minAmountInput
|
|
82
82
|
}),
|
|
83
83
|
/* @__PURE__ */ f(s, {
|
|
84
84
|
variant: "body2",
|
|
@@ -86,12 +86,12 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
86
86
|
}),
|
|
87
87
|
/* @__PURE__ */ f(v, {
|
|
88
88
|
value: n.maxAmount,
|
|
89
|
-
onChange: (e) =>
|
|
90
|
-
onBlur: () =>
|
|
89
|
+
onChange: (e) => T({ maxAmount: e }),
|
|
90
|
+
onBlur: () => A("maxAmount"),
|
|
91
91
|
placeholder: l.MaximumPlaceholder,
|
|
92
|
-
error:
|
|
92
|
+
error: j.maxAmount,
|
|
93
93
|
disabled: m,
|
|
94
|
-
testId:
|
|
94
|
+
testId: w?.maxAmountInput
|
|
95
95
|
})
|
|
96
96
|
]
|
|
97
97
|
}) }),
|
|
@@ -102,10 +102,10 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
102
102
|
children: [
|
|
103
103
|
/* @__PURE__ */ f("input", {
|
|
104
104
|
type: "radio",
|
|
105
|
-
name:
|
|
105
|
+
name: N,
|
|
106
106
|
value: c.AutoApprove,
|
|
107
107
|
checked: n.outcome === c.AutoApprove,
|
|
108
|
-
onChange: () =>
|
|
108
|
+
onChange: () => T({
|
|
109
109
|
outcome: c.AutoApprove,
|
|
110
110
|
approvers: []
|
|
111
111
|
}),
|
|
@@ -123,10 +123,10 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ f("input", {
|
|
125
125
|
type: "radio",
|
|
126
|
-
name:
|
|
126
|
+
name: N,
|
|
127
127
|
value: c.RequireApproval,
|
|
128
128
|
checked: n.outcome === c.RequireApproval,
|
|
129
|
-
onChange: () =>
|
|
129
|
+
onChange: () => T({ outcome: c.RequireApproval }),
|
|
130
130
|
disabled: m,
|
|
131
131
|
className: "ttw:accent-primary ttw:mt-0.5"
|
|
132
132
|
}),
|
|
@@ -153,11 +153,11 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
153
153
|
children: l.RequireApprovalFrom
|
|
154
154
|
}),
|
|
155
155
|
/* @__PURE__ */ f(t, {
|
|
156
|
-
items:
|
|
156
|
+
items: I,
|
|
157
157
|
value: n.approvers.map((e) => e.id),
|
|
158
158
|
onValueChange: (e) => {
|
|
159
|
-
|
|
160
|
-
let t =
|
|
159
|
+
T({ approvers: (Array.isArray(e) ? e : [e]).flatMap((e) => {
|
|
160
|
+
let t = L.get(e);
|
|
161
161
|
return t ? [t] : [];
|
|
162
162
|
}) });
|
|
163
163
|
},
|
|
@@ -168,9 +168,9 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
168
168
|
chipBackgroundColor: "#4f46e5",
|
|
169
169
|
chipTextColor: "#ffffff"
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
j.approvers ? /* @__PURE__ */ f("span", {
|
|
172
172
|
className: "ttw:text-xs ttw:text-destructive",
|
|
173
|
-
children:
|
|
173
|
+
children: j.approvers
|
|
174
174
|
}) : null
|
|
175
175
|
]
|
|
176
176
|
}) : null,
|
|
@@ -193,9 +193,9 @@ var y = ({ values: n, approverOptions: r, validationErrors: i, isEditing: o, dis
|
|
|
193
193
|
children: l.Cancel
|
|
194
194
|
}), /* @__PURE__ */ f(e, {
|
|
195
195
|
size: "sm",
|
|
196
|
-
onClick:
|
|
196
|
+
onClick: M,
|
|
197
197
|
disabled: m || y,
|
|
198
|
-
"data-testid":
|
|
198
|
+
"data-testid": w?.saveButton,
|
|
199
199
|
children: l.Save
|
|
200
200
|
})]
|
|
201
201
|
})]
|
|
@@ -10,11 +10,11 @@ import { CircleCheck as d, Info as f, PlusIcon as p } from "lucide-react";
|
|
|
10
10
|
function m(e) {
|
|
11
11
|
return e.to === null ? `${r.Above} ${i(e.from)}` : `${i(e.from)} ${r.RangeSeparator} ${i(e.to)}`;
|
|
12
12
|
}
|
|
13
|
-
var h = ({ rules: i, isBusy: h, isLoading: g, isAddingRule: _, newRuleFormValues: v, newRuleValidationErrors: y, editingRuleId: b, editingRuleFormValues: x, editingRuleValidationErrors: S, approverOptions: C, allExpensesAreCovered: w, gapIntervals: T, onAddRuleClick: E, onCancelAddRule: D, onSaveNewRule: O, onNewRuleFormChange: k, onEditRule: A, onCancelEditRule: j, onSaveEditRule: M, onEditRuleFormChange: N, onDeleteRule: P, onLearnMore: F }) => {
|
|
14
|
-
let
|
|
13
|
+
var h = ({ rules: i, isBusy: h, isLoading: g, isAddingRule: _, newRuleFormValues: v, newRuleValidationErrors: y, editingRuleId: b, editingRuleFormValues: x, editingRuleValidationErrors: S, approverOptions: C, allExpensesAreCovered: w, gapIntervals: T, onAddRuleClick: E, onCancelAddRule: D, onSaveNewRule: O, onNewRuleFormChange: k, onEditRule: A, onCancelEditRule: j, onSaveEditRule: M, onEditRuleFormChange: N, onDeleteRule: P, onLearnMore: F, testIds: I }) => {
|
|
14
|
+
let L = i.length > 0, R = !w && !_ && !b;
|
|
15
15
|
return /* @__PURE__ */ l("div", {
|
|
16
16
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
17
|
-
children: g && !
|
|
17
|
+
children: g && !L && !_ && !b ? /* @__PURE__ */ l(c, { children: Array.from({ length: 2 }).map((e, n) => /* @__PURE__ */ u("div", {
|
|
18
18
|
className: "ttw:border ttw:border-border ttw:rounded-lg ttw:p-4 ttw:flex ttw:flex-col ttw:gap-3",
|
|
19
19
|
children: [/* @__PURE__ */ u("div", {
|
|
20
20
|
className: "ttw:flex ttw:items-center ttw:justify-between",
|
|
@@ -23,7 +23,7 @@ var h = ({ rules: i, isBusy: h, isLoading: g, isAddingRule: _, newRuleFormValues
|
|
|
23
23
|
children: [/* @__PURE__ */ l(t, { className: "ttw:h-8 ttw:w-8" }), /* @__PURE__ */ l(t, { className: "ttw:h-8 ttw:w-8" })]
|
|
24
24
|
})]
|
|
25
25
|
}), /* @__PURE__ */ l(t, { className: "ttw:h-6 ttw:w-32" })]
|
|
26
|
-
}, n)) }) : !
|
|
26
|
+
}, n)) }) : !L && !_ ? /* @__PURE__ */ l(a, {
|
|
27
27
|
onAddRule: E,
|
|
28
28
|
onLearnMore: F
|
|
29
29
|
}) : /* @__PURE__ */ u(c, { children: [
|
|
@@ -37,12 +37,14 @@ var h = ({ rules: i, isBusy: h, isLoading: g, isAddingRule: _, newRuleFormValues
|
|
|
37
37
|
onValuesChange: N,
|
|
38
38
|
onSave: M,
|
|
39
39
|
onCancel: j,
|
|
40
|
-
onDelete: () => P(e.id)
|
|
40
|
+
onDelete: () => P(e.id),
|
|
41
|
+
testIds: I?.ruleForm
|
|
41
42
|
}, e.id) : /* @__PURE__ */ l(o, {
|
|
42
43
|
rule: e,
|
|
43
44
|
onEdit: A,
|
|
44
45
|
onDelete: P,
|
|
45
|
-
disabled: h
|
|
46
|
+
disabled: h,
|
|
47
|
+
testIds: I?.ruleCard
|
|
46
48
|
}, e.id)),
|
|
47
49
|
_ && !b && /* @__PURE__ */ l(s, {
|
|
48
50
|
values: v,
|
|
@@ -53,9 +55,10 @@ var h = ({ rules: i, isBusy: h, isLoading: g, isAddingRule: _, newRuleFormValues
|
|
|
53
55
|
isSaveDisabled: !!(y.minAmount || y.maxAmount),
|
|
54
56
|
onValuesChange: k,
|
|
55
57
|
onSave: O,
|
|
56
|
-
onCancel: D
|
|
58
|
+
onCancel: D,
|
|
59
|
+
testIds: I?.ruleForm
|
|
57
60
|
}),
|
|
58
|
-
|
|
61
|
+
R && /* @__PURE__ */ u("div", {
|
|
59
62
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:border ttw:border-dashed ttw:border-border ttw:rounded-lg ttw:px-4 ttw:py-3",
|
|
60
63
|
children: [/* @__PURE__ */ l("span", {
|
|
61
64
|
className: "ttw:text-sm ttw:font-bold ttw:text-foreground",
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { mapInsightToRowView as e } from "./index9.js";
|
|
2
|
-
import { SingleInsight as t } from "../../ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js";
|
|
3
|
-
import "../../ui/dist/index.js";
|
|
4
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
5
1
|
//#region ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
var e = {
|
|
3
|
+
skeleton: "insights-widget-skeleton",
|
|
4
|
+
error: "insights-widget-error",
|
|
5
|
+
retry: "insights-widget-retry",
|
|
6
|
+
activeTab: "insights-widget-active-tab",
|
|
7
|
+
list: "insights-widget-list",
|
|
8
|
+
singleInsight: "insights-widget-single-insight",
|
|
9
|
+
dismiss: "insights-widget-dismiss",
|
|
10
|
+
toggle: "insights-widget-toggle",
|
|
11
|
+
navigation: "insights-widget-navigation",
|
|
12
|
+
action: "insights-widget-action"
|
|
15
13
|
};
|
|
16
14
|
//#endregion
|
|
17
|
-
export {
|
|
15
|
+
export { e as insightsWidgetTestIds };
|
|
@@ -1,66 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"use client";
|
|
5
|
-
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
-
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
-
import "../../../shared/feature/dist/index.js";
|
|
8
|
-
import "./index3.js";
|
|
9
|
-
import { InsightsWidgetContextProvider as n, useInsightsWidgetContext as r } from "./index8.js";
|
|
10
|
-
import { InsightsWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "./index2.js";
|
|
11
|
-
import { InsightsWidget as o } from "../../ui/dist/lib/InsightsWidget/InsightsWidget.js";
|
|
1
|
+
import { insightsWidgetTestIds as e } from "./index10.js";
|
|
2
|
+
import { mapInsightToRowView as t } from "./index9.js";
|
|
3
|
+
import { SingleInsight as n } from "../../ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js";
|
|
12
4
|
import "../../ui/dist/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import { useEffect as c } from "react";
|
|
15
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
16
6
|
//#region ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
children: f.map((e) => /* @__PURE__ */ l(s, {
|
|
33
|
-
insight: e,
|
|
34
|
-
createdDate: v,
|
|
35
|
-
featureLabels: _,
|
|
36
|
-
onDismissClick: g,
|
|
37
|
-
labels: n
|
|
38
|
-
}, e.id))
|
|
7
|
+
var i = ({ insight: i, createdDate: a, featureLabels: o, onDismissClick: s, labels: c }) => {
|
|
8
|
+
let l = t(i, o, a);
|
|
9
|
+
return /* @__PURE__ */ r(n, {
|
|
10
|
+
row: l,
|
|
11
|
+
labels: c,
|
|
12
|
+
testIds: {
|
|
13
|
+
root: e.singleInsight,
|
|
14
|
+
dismiss: e.dismiss,
|
|
15
|
+
toggle: e.toggle,
|
|
16
|
+
navigation: e.navigation,
|
|
17
|
+
action: e.action
|
|
18
|
+
},
|
|
19
|
+
onDismissClick: l.showDismissButton ? () => {
|
|
20
|
+
s(i.id);
|
|
21
|
+
} : void 0
|
|
39
22
|
});
|
|
40
|
-
}
|
|
41
|
-
var d = ({ labels: e, singleInsightLabels: t, featureLabels: r, routingEnabled: i, onRoutingToggleChange: a, onLinkExternalAccountClick: o }) => /* @__PURE__ */ l(n, {
|
|
42
|
-
routingEnabled: i,
|
|
43
|
-
onRoutingToggleChange: a,
|
|
44
|
-
onLinkExternalAccountClick: o,
|
|
45
|
-
featureLabels: r,
|
|
46
|
-
children: /* @__PURE__ */ l(u, {
|
|
47
|
-
labels: e,
|
|
48
|
-
singleInsightLabels: t
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
function f({ labels: e, singleInsightLabels: n, featureLabels: r, routingEnabled: i, onRoutingToggleChange: o, onLinkExternalAccountClick: s, ...c }) {
|
|
52
|
-
return /* @__PURE__ */ l(t, {
|
|
53
|
-
...c,
|
|
54
|
-
widgetName: a,
|
|
55
|
-
children: /* @__PURE__ */ l(d, {
|
|
56
|
-
labels: e,
|
|
57
|
-
singleInsightLabels: n,
|
|
58
|
-
featureLabels: r,
|
|
59
|
-
routingEnabled: i,
|
|
60
|
-
onRoutingToggleChange: o,
|
|
61
|
-
onLinkExternalAccountClick: s
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
|
23
|
+
};
|
|
65
24
|
//#endregion
|
|
66
|
-
export {
|
|
25
|
+
export { i as SingleInsight };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
6
|
+
import { WidgetProvider as t } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
7
|
+
import "../../../shared/feature/dist/index.js";
|
|
8
|
+
import "./index3.js";
|
|
9
|
+
import { InsightsWidgetContextProvider as n, useInsightsWidgetContext as r } from "./index8.js";
|
|
10
|
+
import { InsightsWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "./index2.js";
|
|
11
|
+
import { insightsWidgetTestIds as o } from "./index10.js";
|
|
12
|
+
import { InsightsWidget as s } from "../../ui/dist/lib/InsightsWidget/InsightsWidget.js";
|
|
13
|
+
import "../../ui/dist/index.js";
|
|
14
|
+
import { SingleInsight as c } from "./index11.js";
|
|
15
|
+
import { useEffect as l } from "react";
|
|
16
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
17
|
+
//#region ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/index12.js
|
|
18
|
+
function d({ labels: t, singleInsightLabels: n }) {
|
|
19
|
+
let a = e();
|
|
20
|
+
l(() => {
|
|
21
|
+
a(i.Mounted);
|
|
22
|
+
}, [a]);
|
|
23
|
+
let { activeFilter: d, setActiveFilter: f, filteredInsights: p, isLoading: m, isError: h, refetch: g, onDismissClick: _, featureLabels: v, createdDateLabel: y } = r();
|
|
24
|
+
return /* @__PURE__ */ u(s, {
|
|
25
|
+
hasInsights: p.length > 0,
|
|
26
|
+
isLoading: m,
|
|
27
|
+
isError: h,
|
|
28
|
+
onRetry: h ? () => void g() : void 0,
|
|
29
|
+
activeFilter: d,
|
|
30
|
+
setActiveFilter: f,
|
|
31
|
+
labels: t,
|
|
32
|
+
testIds: {
|
|
33
|
+
activeTab: o.activeTab,
|
|
34
|
+
skeleton: o.skeleton,
|
|
35
|
+
error: o.error,
|
|
36
|
+
retry: o.retry,
|
|
37
|
+
list: o.list
|
|
38
|
+
},
|
|
39
|
+
children: p.map((e) => /* @__PURE__ */ u(c, {
|
|
40
|
+
insight: e,
|
|
41
|
+
createdDate: y,
|
|
42
|
+
featureLabels: v,
|
|
43
|
+
onDismissClick: _,
|
|
44
|
+
labels: n
|
|
45
|
+
}, e.id))
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
var f = ({ labels: e, singleInsightLabels: t, featureLabels: r, routingEnabled: i, onRoutingToggleChange: a, onLinkExternalAccountClick: o }) => /* @__PURE__ */ u(n, {
|
|
49
|
+
routingEnabled: i,
|
|
50
|
+
onRoutingToggleChange: a,
|
|
51
|
+
onLinkExternalAccountClick: o,
|
|
52
|
+
featureLabels: r,
|
|
53
|
+
children: /* @__PURE__ */ u(d, {
|
|
54
|
+
labels: e,
|
|
55
|
+
singleInsightLabels: t
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
function p({ labels: e, singleInsightLabels: n, featureLabels: r, routingEnabled: i, onRoutingToggleChange: o, onLinkExternalAccountClick: s, ...c }) {
|
|
59
|
+
return /* @__PURE__ */ u(t, {
|
|
60
|
+
...c,
|
|
61
|
+
widgetName: a,
|
|
62
|
+
children: /* @__PURE__ */ u(f, {
|
|
63
|
+
labels: e,
|
|
64
|
+
singleInsightLabels: n,
|
|
65
|
+
featureLabels: r,
|
|
66
|
+
routingEnabled: i,
|
|
67
|
+
onRoutingToggleChange: o,
|
|
68
|
+
onLinkExternalAccountClick: s
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { p as InsightsWidget, d as InsightsWidgetInternal, f as InsightsWidgetWithContext };
|
|
@@ -5,7 +5,7 @@ import { INSIGHTS_WIDGET_LABELS_EN as a } from "./labels.js";
|
|
|
5
5
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
6
|
import { Sparkles as l } from "lucide-react";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js
|
|
8
|
-
var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isLoading: m, isError: h, onRetry: g, labels: _,
|
|
8
|
+
var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isLoading: m, isError: h, onRetry: g, labels: _, testIds: v }) => {
|
|
9
9
|
let y = {
|
|
10
10
|
...a,
|
|
11
11
|
..._
|
|
@@ -17,13 +17,13 @@ var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isL
|
|
|
17
17
|
}),
|
|
18
18
|
title: y.widgetTitle,
|
|
19
19
|
children: m ? /* @__PURE__ */ s(t, {
|
|
20
|
-
"data-testid":
|
|
20
|
+
"data-testid": v?.skeleton,
|
|
21
21
|
height: 80,
|
|
22
22
|
width: "100%",
|
|
23
23
|
className: "ttw:rounded-md"
|
|
24
24
|
}) : h ? /* @__PURE__ */ c("div", {
|
|
25
25
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
26
|
-
"data-testid":
|
|
26
|
+
"data-testid": v?.error,
|
|
27
27
|
children: [
|
|
28
28
|
/* @__PURE__ */ s(n, {
|
|
29
29
|
component: "p",
|
|
@@ -43,7 +43,7 @@ var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isL
|
|
|
43
43
|
size: "sm",
|
|
44
44
|
className: "ttw:self-start ttw:cursor-pointer",
|
|
45
45
|
onClick: g,
|
|
46
|
-
"data-testid":
|
|
46
|
+
"data-testid": v?.retry,
|
|
47
47
|
children: y.loadErrorRetry
|
|
48
48
|
}) : null
|
|
49
49
|
]
|
|
@@ -51,7 +51,7 @@ var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isL
|
|
|
51
51
|
className: "ttw:mb-2 ttw:flex ttw:flex-row ttw:gap-1",
|
|
52
52
|
children: [/* @__PURE__ */ s(e, {
|
|
53
53
|
type: "button",
|
|
54
|
-
"data-testid": v,
|
|
54
|
+
"data-testid": v?.activeTab,
|
|
55
55
|
variant: f === "active" ? "default" : "outline",
|
|
56
56
|
size: "sm",
|
|
57
57
|
className: r("ttw:cursor-pointer ttw:rounded-md ttw:font-normal", f !== "active" && "ttw:border-border ttw:text-foreground"),
|
|
@@ -67,7 +67,7 @@ var u = ({ hasInsights: u, children: d, activeFilter: f, setActiveFilter: p, isL
|
|
|
67
67
|
})]
|
|
68
68
|
}), u ? /* @__PURE__ */ s("div", {
|
|
69
69
|
className: "ttw:flex ttw:max-h-80 ttw:flex-col ttw:gap-1.5 ttw:overflow-y-auto ttw:rounded-2xl ttw:bg-[#F0F2FD] ttw:p-2",
|
|
70
|
-
"data-testid":
|
|
70
|
+
"data-testid": v?.list,
|
|
71
71
|
children: d
|
|
72
72
|
}) : /* @__PURE__ */ s(n, {
|
|
73
73
|
color: "muted",
|
|
@@ -3,14 +3,14 @@ import { SINGLE_INSIGHT_LABELS_EN as i } from "./labels.js";
|
|
|
3
3
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
4
|
import { ArrowRight as s, X as c } from "lucide-react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js
|
|
6
|
-
var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
7
|
-
let
|
|
6
|
+
var l = ({ row: l, onDismissClick: u, labels: d, testIds: f }) => {
|
|
7
|
+
let p = {
|
|
8
8
|
...i,
|
|
9
9
|
...d
|
|
10
|
-
},
|
|
10
|
+
}, m = l.showToggle || !!(l.navigationLinkText && l.onNavigationClick) || !!(l.actionText && l.onActionClick);
|
|
11
11
|
return /* @__PURE__ */ o("div", {
|
|
12
12
|
className: "ttw:rounded-xl ttw:border ttw:border-[#E0E4EA] ttw:bg-background ttw:p-2",
|
|
13
|
-
"data-testid":
|
|
13
|
+
"data-testid": f?.root,
|
|
14
14
|
children: [
|
|
15
15
|
/* @__PURE__ */ o("div", {
|
|
16
16
|
className: "ttw:mb-1 ttw:flex ttw:flex-row ttw:items-center ttw:justify-between",
|
|
@@ -31,9 +31,9 @@ var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
|
31
31
|
variant: "ghost",
|
|
32
32
|
size: "icon-sm",
|
|
33
33
|
className: "ttw:size-8 ttw:shrink-0 ttw:cursor-pointer",
|
|
34
|
-
"aria-label":
|
|
34
|
+
"aria-label": p.dismissInsightAriaLabel,
|
|
35
35
|
onClick: u,
|
|
36
|
-
"data-testid":
|
|
36
|
+
"data-testid": f?.dismiss,
|
|
37
37
|
children: /* @__PURE__ */ a(c, {
|
|
38
38
|
className: "ttw:size-4",
|
|
39
39
|
"aria-hidden": !0
|
|
@@ -43,7 +43,7 @@ var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
|
43
43
|
/* @__PURE__ */ a(r, {
|
|
44
44
|
variant: "body1",
|
|
45
45
|
component: "p",
|
|
46
|
-
className:
|
|
46
|
+
className: m ? "ttw:mb-1" : "",
|
|
47
47
|
children: l.displayText
|
|
48
48
|
}),
|
|
49
49
|
l.showToggle ? /* @__PURE__ */ o("div", {
|
|
@@ -51,7 +51,7 @@ var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
|
51
51
|
children: [l.onToggle ? /* @__PURE__ */ a(n, {
|
|
52
52
|
checked: l.toggleChecked ?? !1,
|
|
53
53
|
onCheckedChange: l.onToggle,
|
|
54
|
-
"data-testid":
|
|
54
|
+
"data-testid": f?.toggle
|
|
55
55
|
}) : null, l.toggleLabel ? /* @__PURE__ */ a(r, {
|
|
56
56
|
variant: "body2",
|
|
57
57
|
component: "span",
|
|
@@ -66,7 +66,7 @@ var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
|
66
66
|
variant: "link",
|
|
67
67
|
className: "ttw:h-auto ttw:gap-0.5 ttw:p-0 ttw:font-medium",
|
|
68
68
|
onClick: l.onNavigationClick,
|
|
69
|
-
"data-testid":
|
|
69
|
+
"data-testid": f?.navigation,
|
|
70
70
|
children: [l.navigationLinkText, /* @__PURE__ */ a(s, {
|
|
71
71
|
className: "ttw:size-[18px] ttw:shrink-0",
|
|
72
72
|
"aria-hidden": !0
|
|
@@ -80,7 +80,7 @@ var l = ({ row: l, onDismissClick: u, labels: d }) => {
|
|
|
80
80
|
variant: "link",
|
|
81
81
|
className: "ttw:h-auto ttw:gap-0.5 ttw:p-0 ttw:font-medium",
|
|
82
82
|
onClick: l.onActionClick,
|
|
83
|
-
"data-testid":
|
|
83
|
+
"data-testid": f?.action,
|
|
84
84
|
children: [l.actionText, /* @__PURE__ */ a(s, {
|
|
85
85
|
className: "ttw:size-[18px] ttw:shrink-0",
|
|
86
86
|
"aria-hidden": !0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { ExpenseApprovalPoliciesWidget as i } from "../../../expense-management-widget/feature/dist/
|
|
6
|
+
import { ExpenseApprovalPoliciesWidget as i } from "../../../expense-management-widget/feature/dist/index6.js";
|
|
7
7
|
import { ExpenseRequirementsWidget as a } from "../../../expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
8
8
|
import "../../../expense-requirements-widget/feature/dist/index.js";
|
|
9
9
|
import "../../../expense-management-widget/feature/dist/index.js";
|