@tesouro/embedded-components-react 0.10.0 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/experimental/index.d.ts +2 -108
- package/dist/experimental/index.js +4 -5
- package/dist/index.d.ts +3 -0
- package/dist/lib/BankAccountsWidget.d.ts +3 -0
- package/dist/lib/WidgetSuite.d.ts +3 -0
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +39 -36
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetFeature.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +31 -22
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index6.js +44 -31
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index7.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +59 -56
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/useDismissedInsightIds.js +77 -38
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +3374 -3474
- package/package.json +1 -1
- package/dist/experimental/ApprovalRequests.d.ts +0 -706
- package/dist/experimental/ApprovalRequests.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index.js +0 -9
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index2.js +0 -9
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index3.js +0 -71
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index4.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index5.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index6.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/data-access/dist/index7.js +0 -30
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/ApprovalRequestsWidget.js +0 -89
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/buildApprovalRequestRows.js +0 -44
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/canDecideApprovalRequest.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/constants.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/labels.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/permissions.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/useApprovalRequestDecisions.js +0 -93
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/useApprovalRequestNames.js +0 -65
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/useApprovalRequestsFilters.js +0 -148
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/ApprovalRequestsWidget/useApprovalRequestsTable.js +0 -73
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/feature/dist/lib/analytics/events.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/ui/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/ui/dist/index2.js +0 -47
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/ui/dist/index3.js +0 -142
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/ui/dist/index4.js +0 -136
- package/dist/libs/tesouro-embedded-components-react/approval-requests-widget/ui/dist/index5.js +0 -43
|
@@ -14,15 +14,15 @@ import { TransactionsTable as se } from "./index6.js";
|
|
|
14
14
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
15
|
import { ChevronLeftIcon as m, HelpCircleIcon as h } from "lucide-react";
|
|
16
16
|
// ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js
|
|
17
|
-
function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAlt: b, balanceLabel: x, balanceTestId: S, isBankingTaglineVisible: C, activeTab: w, transactionRows: T,
|
|
17
|
+
function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAlt: b, balanceLabel: x, balanceTestId: S, isBankingTaglineVisible: C, activeTab: w, transactionRows: T, isTransactionsError: E, isTransactionsLoading: D, onTransactionsRetry: O, statementRows: k, isStatementsLoading: A, isStatementsError: j, onStatementsRetry: M, isStatementsPaginationVisible: N, statementsPageSize: P, statementsPageSizeOptions: F, statementsRangeLabel: I = "", isStatementsPreviousPageDisabled: L, isStatementsNextPageDisabled: R, onStatementsPageSizeChange: z, onStatementsPreviousPageClick: B, onStatementsNextPageClick: V, showExport: H, isExportOpen: U, exportStartDate: W, exportEndDate: G, isExportDownloading: K, isExportDownloadDisabled: ce, disabledExportStartDates: le, disabledExportEndDates: ue, accountNumberLabel: de, maskedAccountNumberLabel: fe, accountNumberTestId: pe, routingNumberLabel: me, bankAddressLabel: he, wireAccountNumberLabel: ge, domesticWireIntroLabel: _e, domesticWireNoteLabel: ve, thingsToKnowBodyLabel: ye, supportTeamHref: be, isAccountNumberVisible: q, isAccountNumberCopied: xe, isRoutingNumberCopied: Se, isDomesticWireExpanded: Ce, isLoading: J, isError: Y, isEditOpen: we, isEditDisabled: Te, isEditError: Ee, isSubmitting: De, isEditSaveDisabled: Oe, editForm: ke, canEdit: Ae, onBack: je, onTabChange: Me, onToggleAccountNumberVisibility: Ne, onCopyAccountNumber: X, onCopyRoutingNumber: Z, onCopyBankName: Pe, onCopyBankAddress: Fe, onDomesticWireExpandedChange: Ie, onEditOpenChange: Le, onEditFormChange: Re, onEditSubmit: ze, onEditNicknameClick: Be, onExportOpenChange: Q, onExportStartDateChange: Ve, onExportEndDateChange: He, onExportDownload: Ue }) {
|
|
18
18
|
let $ = {
|
|
19
19
|
...te,
|
|
20
20
|
...g
|
|
21
|
-
},
|
|
21
|
+
}, We = /* @__PURE__ */ p(e, {
|
|
22
22
|
type: "button",
|
|
23
23
|
variant: "ghost",
|
|
24
24
|
className: "ttw:h-auto ttw:justify-start ttw:gap-1 ttw:px-0 ttw:py-1 ttw:has-[>svg]:px-0 ttw:text-sm ttw:font-medium ttw:leading-5 ttw:text-primary ttw:hover:bg-transparent",
|
|
25
|
-
onClick:
|
|
25
|
+
onClick: je,
|
|
26
26
|
children: [/* @__PURE__ */ f(m, { className: "ttw:size-4" }), $.backToAccounts]
|
|
27
27
|
});
|
|
28
28
|
return /* @__PURE__ */ p("section", {
|
|
@@ -30,34 +30,34 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
30
30
|
children: [
|
|
31
31
|
!J && !Y ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ie, {
|
|
32
32
|
labels: $,
|
|
33
|
-
open:
|
|
34
|
-
form:
|
|
35
|
-
isSubmitting:
|
|
36
|
-
isSaveDisabled:
|
|
37
|
-
isError:
|
|
38
|
-
onOpenChange:
|
|
39
|
-
onFormChange:
|
|
40
|
-
onSubmit:
|
|
33
|
+
open: we,
|
|
34
|
+
form: ke,
|
|
35
|
+
isSubmitting: De,
|
|
36
|
+
isSaveDisabled: Oe,
|
|
37
|
+
isError: Ee,
|
|
38
|
+
onOpenChange: Le,
|
|
39
|
+
onFormChange: Re,
|
|
40
|
+
onSubmit: ze
|
|
41
41
|
}), /* @__PURE__ */ f(ae, {
|
|
42
42
|
labels: $,
|
|
43
|
-
open:
|
|
44
|
-
startDate:
|
|
45
|
-
endDate:
|
|
46
|
-
isDownloading:
|
|
47
|
-
isDownloadDisabled:
|
|
48
|
-
disabledStartDates:
|
|
49
|
-
disabledEndDates:
|
|
43
|
+
open: U,
|
|
44
|
+
startDate: W,
|
|
45
|
+
endDate: G,
|
|
46
|
+
isDownloading: K,
|
|
47
|
+
isDownloadDisabled: ce,
|
|
48
|
+
disabledStartDates: le,
|
|
49
|
+
disabledEndDates: ue,
|
|
50
50
|
onOpenChange: Q,
|
|
51
|
-
onStartDateChange:
|
|
52
|
-
onEndDateChange:
|
|
53
|
-
onDownload:
|
|
51
|
+
onStartDateChange: Ve,
|
|
52
|
+
onEndDateChange: He,
|
|
53
|
+
onDownload: Ue
|
|
54
54
|
})] }) : null,
|
|
55
55
|
/* @__PURE__ */ p("div", {
|
|
56
56
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
57
|
-
children: [
|
|
57
|
+
children: [We, !J && !Y ? /* @__PURE__ */ f(re, {
|
|
58
58
|
labels: $,
|
|
59
|
-
canEdit:
|
|
60
|
-
onEditNickname:
|
|
59
|
+
canEdit: Ae,
|
|
60
|
+
onEditNickname: Be
|
|
61
61
|
}) : null]
|
|
62
62
|
}),
|
|
63
63
|
J ? /* @__PURE__ */ p("div", {
|
|
@@ -110,7 +110,7 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
110
110
|
})]
|
|
111
111
|
}), /* @__PURE__ */ p(ee, {
|
|
112
112
|
value: w,
|
|
113
|
-
onValueChange: (e) =>
|
|
113
|
+
onValueChange: (e) => Me(e),
|
|
114
114
|
className: "ttw:gap-4",
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ p(r, { children: [
|
|
@@ -132,55 +132,58 @@ function g({ labels: g, title: _, bankDisplayName: v, bankLogoSrc: y, bankLogoAl
|
|
|
132
132
|
children: /* @__PURE__ */ f(se, {
|
|
133
133
|
labels: $,
|
|
134
134
|
rows: T,
|
|
135
|
-
showExport:
|
|
136
|
-
onExportClick: () => Q(!0)
|
|
135
|
+
showExport: H,
|
|
136
|
+
onExportClick: () => Q(!0),
|
|
137
|
+
isError: E,
|
|
138
|
+
isLoading: D,
|
|
139
|
+
onRetry: O
|
|
137
140
|
})
|
|
138
141
|
}),
|
|
139
142
|
/* @__PURE__ */ f(n, {
|
|
140
143
|
value: "statements",
|
|
141
144
|
children: /* @__PURE__ */ f(oe, {
|
|
142
145
|
labels: $,
|
|
143
|
-
rows:
|
|
144
|
-
isLoading:
|
|
145
|
-
isError:
|
|
146
|
-
onRetry:
|
|
147
|
-
isPaginationVisible:
|
|
148
|
-
pageSize:
|
|
149
|
-
pageSizeOptions:
|
|
150
|
-
rangeLabel:
|
|
151
|
-
isPreviousPageDisabled:
|
|
152
|
-
isNextPageDisabled:
|
|
153
|
-
onPageSizeChange:
|
|
154
|
-
onPreviousPageClick:
|
|
155
|
-
onNextPageClick:
|
|
146
|
+
rows: k,
|
|
147
|
+
isLoading: A,
|
|
148
|
+
isError: j,
|
|
149
|
+
onRetry: M,
|
|
150
|
+
isPaginationVisible: N,
|
|
151
|
+
pageSize: P,
|
|
152
|
+
pageSizeOptions: F,
|
|
153
|
+
rangeLabel: I,
|
|
154
|
+
isPreviousPageDisabled: L,
|
|
155
|
+
isNextPageDisabled: R,
|
|
156
|
+
onPageSizeChange: z,
|
|
157
|
+
onPreviousPageClick: B,
|
|
158
|
+
onNextPageClick: V
|
|
156
159
|
})
|
|
157
160
|
}),
|
|
158
161
|
/* @__PURE__ */ f(n, {
|
|
159
162
|
value: "details",
|
|
160
163
|
children: /* @__PURE__ */ f(ne, {
|
|
161
164
|
labels: $,
|
|
162
|
-
routingNumberLabel:
|
|
163
|
-
accountNumberDisplayLabel: q ?
|
|
164
|
-
accountNumberTestId:
|
|
165
|
-
wireAccountNumberLabel:
|
|
165
|
+
routingNumberLabel: me,
|
|
166
|
+
accountNumberDisplayLabel: q ? de : fe,
|
|
167
|
+
accountNumberTestId: pe,
|
|
168
|
+
wireAccountNumberLabel: ge,
|
|
166
169
|
bankNameLabel: v,
|
|
167
|
-
bankAddressLabel:
|
|
168
|
-
domesticWireIntroLabel:
|
|
169
|
-
domesticWireNoteLabel:
|
|
170
|
-
thingsToKnowBodyLabel:
|
|
171
|
-
supportTeamHref:
|
|
170
|
+
bankAddressLabel: he,
|
|
171
|
+
domesticWireIntroLabel: _e,
|
|
172
|
+
domesticWireNoteLabel: ve,
|
|
173
|
+
thingsToKnowBodyLabel: ye,
|
|
174
|
+
supportTeamHref: be,
|
|
172
175
|
isAccountNumberVisible: q,
|
|
173
|
-
isAccountNumberCopied:
|
|
174
|
-
isRoutingNumberCopied:
|
|
175
|
-
isDomesticWireExpanded:
|
|
176
|
-
onDomesticWireExpandedChange:
|
|
177
|
-
onToggleAccountNumberVisibility:
|
|
176
|
+
isAccountNumberCopied: xe,
|
|
177
|
+
isRoutingNumberCopied: Se,
|
|
178
|
+
isDomesticWireExpanded: Ce,
|
|
179
|
+
onDomesticWireExpandedChange: Ie,
|
|
180
|
+
onToggleAccountNumberVisibility: Ne,
|
|
178
181
|
onCopyAccountNumber: X,
|
|
179
182
|
onCopyRoutingNumber: Z,
|
|
180
183
|
onCopyWireAccountNumber: X,
|
|
181
184
|
onCopyWireRoutingNumber: Z,
|
|
182
|
-
onCopyBankName:
|
|
183
|
-
onCopyBankAddress:
|
|
185
|
+
onCopyBankName: Pe,
|
|
186
|
+
onCopyBankAddress: Fe
|
|
184
187
|
})
|
|
185
188
|
})
|
|
186
189
|
]
|
|
@@ -6,58 +6,97 @@ import { useEmbedApi as e } from "../../../../../shared/data-access/dist/lib/Emb
|
|
|
6
6
|
import { useGetUserDataQuery as t } from "../../../../../shared/data-access/dist/lib/useGetUserDataQuery.js";
|
|
7
7
|
import { useUpsertUserDataMutation as n } from "../../../../../shared/data-access/dist/lib/useUpsertUserDataMutation.js";
|
|
8
8
|
import "../../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
9
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
+
import "../../../../../shared/feature/dist/index.js";
|
|
11
|
+
import { getDismissedInsightsUserDataKey as a } from "./dismissedInsightsUserDataKey.js";
|
|
12
|
+
import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
11
13
|
// ../../libs/tesouro-embedded-components-react/insights-widget/feature/dist/lib/InsightsWidget/useDismissedInsightIds.js
|
|
12
|
-
function
|
|
14
|
+
function d(e) {
|
|
13
15
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
|
|
14
16
|
}
|
|
15
|
-
function
|
|
17
|
+
function f(e, t) {
|
|
16
18
|
if (e.length !== t.length) return !1;
|
|
17
19
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
18
20
|
return !0;
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
function p(e, t) {
|
|
23
|
+
let n = t.filter((t) => !e.includes(t));
|
|
24
|
+
return n.length === 0 ? e : [...e, ...n];
|
|
25
|
+
}
|
|
26
|
+
function m() {
|
|
27
|
+
let { organizationId: m } = e(), { initResponse: h } = r(), g = i(), _ = a(m), v = !!(!g && _ && h?.userId), y = l(null);
|
|
28
|
+
g || (y.current = h?.userId ?? null);
|
|
29
|
+
let b = y.current, x = _ ? `${_}:${b ?? "session"}` : "", { data: S, dataUpdatedAt: C, isLoading: w, isError: T, isPlaceholderData: E, refetch: D } = t({
|
|
30
|
+
key: _,
|
|
31
|
+
defaultWhenNotFound: [],
|
|
32
|
+
enabled: v
|
|
33
|
+
}), { mutateAsync: O } = n(), k = c(() => !v || E ? null : S?.value === void 0 ? T ? [] : null : d(S.value), [
|
|
34
|
+
v,
|
|
35
|
+
S,
|
|
36
|
+
C,
|
|
37
|
+
T,
|
|
38
|
+
E
|
|
39
|
+
]), [A, j] = u([]), [M, N] = u(""), P = l([]), F = l([]), I = l(x);
|
|
40
|
+
I.current = x;
|
|
41
|
+
let L = l({
|
|
42
|
+
key: _,
|
|
43
|
+
userId: b
|
|
44
|
+
});
|
|
45
|
+
s(() => {
|
|
46
|
+
let e = L.current;
|
|
47
|
+
if (L.current = {
|
|
48
|
+
key: _,
|
|
49
|
+
userId: b
|
|
50
|
+
}, !_ || e.key !== _) j((e) => e.length === 0 ? e : []), N(""), P.current = [], F.current = [];
|
|
51
|
+
else if (e.userId !== b && e.userId !== null) {
|
|
52
|
+
let e = F.current;
|
|
53
|
+
j((t) => f(t, e) ? t : e), N(""), P.current = [];
|
|
54
|
+
}
|
|
55
|
+
if (!v || w || k === null) return;
|
|
56
|
+
let t = F.current, n = p(k, t);
|
|
57
|
+
if (j((e) => f(e, n) ? e : n), N(x), P.current = k, t.length === 0 || (F.current = [], n === k)) return;
|
|
58
|
+
let r = x;
|
|
59
|
+
O({
|
|
60
|
+
path: { key: _ },
|
|
61
|
+
body: { value: n }
|
|
62
|
+
}).then(() => {
|
|
63
|
+
r === I.current && (P.current = n);
|
|
64
|
+
}).catch((e) => {
|
|
65
|
+
r === I.current && (j(P.current), console.error("Error persisting dismissed insight id", e));
|
|
66
|
+
});
|
|
34
67
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
68
|
+
v,
|
|
69
|
+
x,
|
|
70
|
+
_,
|
|
71
|
+
w,
|
|
72
|
+
O,
|
|
73
|
+
k,
|
|
74
|
+
b
|
|
38
75
|
]);
|
|
39
|
-
let
|
|
40
|
-
if (!
|
|
41
|
-
let t =
|
|
42
|
-
|
|
76
|
+
let R = v && T, z = o((e) => {
|
|
77
|
+
if (!_ || !x) return;
|
|
78
|
+
let t = A, n = t.includes(e) ? t : [...t, e], r = _, i = x;
|
|
79
|
+
j(n), v ? O({
|
|
43
80
|
path: { key: r },
|
|
44
81
|
body: { value: n }
|
|
45
82
|
}).then(() => {
|
|
46
|
-
|
|
83
|
+
i === I.current && (P.current = n);
|
|
47
84
|
}).catch((e) => {
|
|
48
|
-
|
|
49
|
-
});
|
|
85
|
+
i === I.current && (j(P.current), console.error("Error persisting dismissed insight id", e));
|
|
86
|
+
}) : F.current.includes(e) || (F.current = [...F.current, e]);
|
|
50
87
|
}, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
88
|
+
v,
|
|
89
|
+
A,
|
|
90
|
+
_,
|
|
91
|
+
x,
|
|
92
|
+
O
|
|
93
|
+
]), B = o(() => v ? D() : Promise.resolve(void 0), [v, D]);
|
|
55
94
|
return {
|
|
56
|
-
dismissedIds:
|
|
57
|
-
isLoading:
|
|
58
|
-
isError:
|
|
59
|
-
refetch:
|
|
60
|
-
dismissInsight:
|
|
95
|
+
dismissedIds: A,
|
|
96
|
+
isLoading: v ? w || !!(E && M !== x) : !1,
|
|
97
|
+
isError: R,
|
|
98
|
+
refetch: B,
|
|
99
|
+
dismissInsight: z
|
|
61
100
|
};
|
|
62
101
|
}
|
|
63
|
-
export {
|
|
102
|
+
export { m as useDismissedInsightIds };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.10.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.10.5", n = "6ec45370f19a1205a1afb45e36a8966cac2b7f09", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|