@tesouro/embedded-components-react 0.2.299 → 0.2.301
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 +0 -1
- package/dist/lib/CardsWidget.d.ts +0 -1
- package/dist/lib/CreateCardWidget.d.ts +0 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index6.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +162 -156
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/SetupView.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/ui/dist/lib/CreateCardWidget/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2939 -2975
- 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/feature/dist/lib/card/cardPresentation.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,8 @@ function l(e, { labels: i, fundingAccountNames: o, canActivate: s, onCardSelect:
|
|
|
42
42
|
nickname: r(e.nickname, i.untitledCard),
|
|
43
43
|
lastFour: e.lastFourDigits,
|
|
44
44
|
typeLabel: i.cardType[e.type] ?? i.emptyValue,
|
|
45
|
-
fundingAccount: d ?? i.emptyValue,
|
|
45
|
+
fundingAccount: d?.name ?? i.emptyValue,
|
|
46
|
+
fundingAccountLastFour: d?.lastFour,
|
|
46
47
|
cardholder: r(e.cardholderName, i.emptyValue),
|
|
47
48
|
statusLabel: i.cardStatus[e.status] ?? i.emptyValue,
|
|
48
49
|
statusTone: t[e.status] ?? "neutral",
|
|
@@ -5,204 +5,210 @@
|
|
|
5
5
|
import { useAllBankAccountsQuery as e } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
6
6
|
import "../../../shared/data-access/dist/index.js";
|
|
7
7
|
import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
-
import { useWidgetConfig as
|
|
9
|
-
import { CardProgram as
|
|
8
|
+
import { useWidgetConfig as n, useWidgetError as ee, useWidgetLoading as te } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
|
+
import { CardProgram as r } from "../../../shared/feature/dist/lib/card/cardProgram.js";
|
|
10
10
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { resolveCardsFeatureLabels as
|
|
12
|
-
import { getCardsPermissions as
|
|
13
|
-
import { CardsWidgetAnalyticsEvent as
|
|
14
|
-
import { maskAccountNumber as
|
|
15
|
-
import { CARD_COLUMNS_BY_PROGRAM as
|
|
16
|
-
import { useCreditCardsQuery as
|
|
17
|
-
import { useDebitCardsQuery as
|
|
11
|
+
import { resolveCardsFeatureLabels as ne } from "./index3.js";
|
|
12
|
+
import { getCardsPermissions as re } from "./index5.js";
|
|
13
|
+
import { CardsWidgetAnalyticsEvent as ie } from "./index2.js";
|
|
14
|
+
import { maskAccountNumber as ae } from "./index4.js";
|
|
15
|
+
import { CARD_COLUMNS_BY_PROGRAM as oe, toCardRows as se, toCreditCardListItems as ce, toDebitCardListItems as le } from "./index6.js";
|
|
16
|
+
import { useCreditCardsQuery as ue } from "../../data-access/dist/index2.js";
|
|
17
|
+
import { useDebitCardsQuery as de } from "../../data-access/dist/index3.js";
|
|
18
18
|
import "../../data-access/dist/index.js";
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useControllableState as
|
|
19
|
+
import { useCallback as i, useEffect as a, useMemo as o, useRef as fe, useState as s } from "react";
|
|
20
|
+
import { useControllableState as pe } from "@radix-ui/react-use-controllable-state";
|
|
21
21
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js
|
|
22
|
-
var
|
|
22
|
+
var me = [
|
|
23
23
|
10,
|
|
24
24
|
25,
|
|
25
25
|
50
|
|
26
|
-
],
|
|
27
|
-
function
|
|
26
|
+
], c = 10, he = "<none>";
|
|
27
|
+
function l(e, t) {
|
|
28
28
|
return e !== void 0 && t !== void 0 && e !== t;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let t = Number.isInteger(e?.pageSize) && Number(e?.pageSize) > 0 ? Number(e?.pageSize) :
|
|
30
|
+
function u(e) {
|
|
31
|
+
let t = Number.isInteger(e?.pageSize) && Number(e?.pageSize) > 0 ? Number(e?.pageSize) : c;
|
|
32
32
|
return {
|
|
33
33
|
paginationToken: e?.paginationToken,
|
|
34
34
|
pageSize: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
let { organizationId:
|
|
43
|
-
cardProgram:
|
|
44
|
-
scopes:
|
|
45
|
-
}), [
|
|
46
|
-
|
|
47
|
-
let [
|
|
48
|
-
|
|
49
|
-
let
|
|
37
|
+
function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationChange: p, featureLabels: m, selectedCardId: ge, defaultSelectedCardId: _e, onSelectedCardIdChange: ve, onCreateCard: h, onActivateCard: g, cardArtSrc: ye }) {
|
|
38
|
+
let _ = o(() => ne(m), [m]), v = t();
|
|
39
|
+
a(() => {
|
|
40
|
+
v(ie.Mounted);
|
|
41
|
+
}, [v]);
|
|
42
|
+
let { organizationId: y, widgetToken: be, initResponse: b } = n(), x = b?.userId ?? void 0, xe = te(), S = !!ee(), C = !!(y && be), w = o(() => re({
|
|
43
|
+
cardProgram: c,
|
|
44
|
+
scopes: b?.scopes
|
|
45
|
+
}), [c, b?.scopes]), T = C && w.canRead && !!b, Se = o(() => u(d), [d?.pageSize, d?.paginationToken]), E = o(() => u(f), [f?.pageSize, f?.paginationToken]), [D, Ce] = s(x);
|
|
46
|
+
x !== void 0 && x !== D && Ce(x);
|
|
47
|
+
let [O, we] = s(y);
|
|
48
|
+
y !== void 0 && y !== O && we(y);
|
|
49
|
+
let k = [
|
|
50
50
|
[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
c,
|
|
52
|
+
O === null ? he : O ?? "",
|
|
53
|
+
D ?? ""
|
|
54
54
|
].join("\0"),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
].join("\0"),
|
|
58
|
-
resetKey:
|
|
59
|
-
paginationToken:
|
|
60
|
-
pageSize:
|
|
61
|
-
})), [
|
|
62
|
-
prop:
|
|
63
|
-
defaultProp:
|
|
64
|
-
onChange:
|
|
55
|
+
E.paginationToken ?? "",
|
|
56
|
+
E.pageSize
|
|
57
|
+
].join("\0"), A = d !== void 0, [j, M] = s(() => ({
|
|
58
|
+
resetKey: k,
|
|
59
|
+
paginationToken: E.paginationToken,
|
|
60
|
+
pageSize: E.pageSize
|
|
61
|
+
})), [Te, Ee] = s(!0), [De, N] = pe({
|
|
62
|
+
prop: ge,
|
|
63
|
+
defaultProp: _e ?? null,
|
|
64
|
+
onChange: ve,
|
|
65
65
|
caller: "CardsWidget"
|
|
66
|
-
}),
|
|
67
|
-
cardProgram:
|
|
68
|
-
organizationId:
|
|
69
|
-
userId:
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
let e =
|
|
73
|
-
|
|
74
|
-
cardProgram:
|
|
75
|
-
organizationId:
|
|
76
|
-
userId:
|
|
77
|
-
}, (e.cardProgram !==
|
|
66
|
+
}), P = fe({
|
|
67
|
+
cardProgram: c,
|
|
68
|
+
organizationId: O,
|
|
69
|
+
userId: D
|
|
70
|
+
}), Oe = P.current.cardProgram !== c || l(P.current.organizationId, O) || l(P.current.userId, D);
|
|
71
|
+
a(() => {
|
|
72
|
+
let e = P.current;
|
|
73
|
+
P.current = {
|
|
74
|
+
cardProgram: c,
|
|
75
|
+
organizationId: O,
|
|
76
|
+
userId: D
|
|
77
|
+
}, (e.cardProgram !== c || l(e.organizationId, O) || l(e.userId, D)) && N(null);
|
|
78
78
|
}, [
|
|
79
|
-
|
|
79
|
+
c,
|
|
80
|
+
O,
|
|
80
81
|
D,
|
|
81
|
-
|
|
82
|
-
M
|
|
82
|
+
N
|
|
83
83
|
]);
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
resetKey:
|
|
90
|
-
paginationToken:
|
|
91
|
-
pageSize:
|
|
84
|
+
let F = i((e) => {
|
|
85
|
+
N(e);
|
|
86
|
+
}, [N]), I = Te && !!x, ke = j.resetKey === k;
|
|
87
|
+
a(() => {
|
|
88
|
+
A || M((e) => e.resetKey === k ? e : {
|
|
89
|
+
resetKey: k,
|
|
90
|
+
paginationToken: E.paginationToken,
|
|
91
|
+
pageSize: E.pageSize
|
|
92
92
|
});
|
|
93
93
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
E.pageSize,
|
|
95
|
+
E.paginationToken,
|
|
96
|
+
A,
|
|
97
|
+
k
|
|
98
98
|
]);
|
|
99
|
-
let
|
|
100
|
-
limit:
|
|
101
|
-
paginationToken:
|
|
102
|
-
userId:
|
|
103
|
-
},
|
|
104
|
-
...
|
|
105
|
-
enabled:
|
|
106
|
-
}),
|
|
107
|
-
...
|
|
108
|
-
enabled:
|
|
109
|
-
}),
|
|
99
|
+
let L = A ? Se : ke ? j : E, Ae = L.paginationToken, R = L.pageSize, z = {
|
|
100
|
+
limit: R,
|
|
101
|
+
paginationToken: Ae,
|
|
102
|
+
userId: I ? x : void 0
|
|
103
|
+
}, B = ue({
|
|
104
|
+
...z,
|
|
105
|
+
enabled: T && c === r.Credit
|
|
106
|
+
}), V = de({
|
|
107
|
+
...z,
|
|
108
|
+
enabled: T && c === r.Debit
|
|
109
|
+
}), H = c === r.Credit ? B : V, U = T && w.canReadFundingAccounts, W = e({ enabled: U }), G = o(() => {
|
|
110
110
|
let e = /* @__PURE__ */ new Map();
|
|
111
|
-
if (!
|
|
112
|
-
for (let t of
|
|
111
|
+
if (!w.canReadFundingAccounts) return e;
|
|
112
|
+
for (let t of W.data?.data ?? []) {
|
|
113
|
+
let n = t.nickname?.trim();
|
|
114
|
+
e.set(t.id, n ? {
|
|
115
|
+
name: n,
|
|
116
|
+
lastFour: t.accountNumber?.trim().slice(-4) || void 0
|
|
117
|
+
} : { name: ae(t.accountNumber) ?? _.untitledFundingAccount });
|
|
118
|
+
}
|
|
113
119
|
return e;
|
|
114
120
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
]),
|
|
124
|
-
labels:
|
|
125
|
-
fundingAccountNames:
|
|
126
|
-
canActivate:
|
|
127
|
-
onCardSelect:
|
|
128
|
-
onActivateCard:
|
|
121
|
+
W.data?.data,
|
|
122
|
+
_.untitledFundingAccount,
|
|
123
|
+
w.canReadFundingAccounts
|
|
124
|
+
]), K = U && W.isError, je = U && !K && (W.isLoading || W.isFetchingNextPage || !!W.hasNextPage), q = o(() => T ? c === r.Credit ? ce(B.data?.data ?? []) : le(V.data?.data ?? []) : [], [
|
|
125
|
+
T,
|
|
126
|
+
c,
|
|
127
|
+
B.data?.data,
|
|
128
|
+
V.data?.data
|
|
129
|
+
]), Me = o(() => se(q, {
|
|
130
|
+
labels: _,
|
|
131
|
+
fundingAccountNames: G,
|
|
132
|
+
canActivate: w.canActivate,
|
|
133
|
+
onCardSelect: F,
|
|
134
|
+
onActivateCard: g
|
|
129
135
|
}), [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
q,
|
|
137
|
+
G,
|
|
138
|
+
F,
|
|
139
|
+
_,
|
|
133
140
|
g,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
resetKey: O,
|
|
141
|
+
w.canActivate
|
|
142
|
+
]), J = H.data?.nextPaginationToken ?? void 0, Y = H.data?.prevPaginationToken ?? void 0, Ne = !!H.data, X = T && (H.isError || K), Z = i((e) => {
|
|
143
|
+
A || M({
|
|
144
|
+
resetKey: k,
|
|
139
145
|
paginationToken: e.paginationToken,
|
|
140
146
|
pageSize: e.pageSize
|
|
141
|
-
}),
|
|
147
|
+
}), p?.(e);
|
|
142
148
|
}, [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
]),
|
|
147
|
-
|
|
149
|
+
A,
|
|
150
|
+
p,
|
|
151
|
+
k
|
|
152
|
+
]), Q = i(() => {
|
|
153
|
+
Z({
|
|
148
154
|
paginationToken: void 0,
|
|
149
|
-
pageSize:
|
|
155
|
+
pageSize: R
|
|
150
156
|
});
|
|
151
|
-
}, [
|
|
152
|
-
|
|
157
|
+
}, [Z, R]), Pe = i((e) => {
|
|
158
|
+
Z({
|
|
153
159
|
paginationToken: void 0,
|
|
154
160
|
pageSize: e
|
|
155
161
|
});
|
|
156
|
-
}, [
|
|
157
|
-
|
|
158
|
-
}, [
|
|
159
|
-
|
|
160
|
-
paginationToken:
|
|
161
|
-
pageSize:
|
|
162
|
+
}, [Z]), Fe = i((e) => {
|
|
163
|
+
Ee(e), Q();
|
|
164
|
+
}, [Q]), Ie = i(() => {
|
|
165
|
+
Z({
|
|
166
|
+
paginationToken: Y,
|
|
167
|
+
pageSize: R
|
|
162
168
|
});
|
|
163
169
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
]),
|
|
168
|
-
|
|
169
|
-
paginationToken:
|
|
170
|
-
pageSize:
|
|
170
|
+
Z,
|
|
171
|
+
R,
|
|
172
|
+
Y
|
|
173
|
+
]), Le = i(() => {
|
|
174
|
+
Z({
|
|
175
|
+
paginationToken: J,
|
|
176
|
+
pageSize: R
|
|
171
177
|
});
|
|
172
178
|
}, [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
]),
|
|
177
|
-
|
|
179
|
+
Z,
|
|
180
|
+
J,
|
|
181
|
+
R
|
|
182
|
+
]), $ = H.refetch, Re = W.refetch, ze = i(() => {
|
|
183
|
+
$(), U && Re();
|
|
178
184
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
U,
|
|
186
|
+
$,
|
|
187
|
+
Re
|
|
182
188
|
]);
|
|
183
189
|
return {
|
|
184
|
-
rows:
|
|
185
|
-
selectedCardId:
|
|
186
|
-
onSelectCard:
|
|
187
|
-
canReadCards:
|
|
188
|
-
columns:
|
|
189
|
-
isLoading: !
|
|
190
|
-
isError:
|
|
191
|
-
canToggleShowMyCards:
|
|
192
|
-
isShowingMyCards:
|
|
193
|
-
onShowMyCardsChange:
|
|
194
|
-
canCreateCard:
|
|
195
|
-
onCreateCardClick:
|
|
196
|
-
onRetry:
|
|
197
|
-
isPaginationVisible:
|
|
198
|
-
pageSize:
|
|
199
|
-
pageSizeOptions:
|
|
200
|
-
isPreviousPageDisabled: !
|
|
201
|
-
isNextPageDisabled: !
|
|
202
|
-
onPageSizeChange:
|
|
203
|
-
onPreviousPageClick:
|
|
204
|
-
onNextPageClick:
|
|
190
|
+
rows: Me,
|
|
191
|
+
selectedCardId: Oe ? null : De,
|
|
192
|
+
onSelectCard: F,
|
|
193
|
+
canReadCards: w.canRead,
|
|
194
|
+
columns: oe[c],
|
|
195
|
+
isLoading: !S && (!C || xe && !b || T && (H.isLoading || je)),
|
|
196
|
+
isError: S || X,
|
|
197
|
+
canToggleShowMyCards: w.canRead && !!x,
|
|
198
|
+
isShowingMyCards: I,
|
|
199
|
+
onShowMyCardsChange: Fe,
|
|
200
|
+
canCreateCard: w.canCreate && (!!h || !!ye && w.canComposeDebitCreate),
|
|
201
|
+
onCreateCardClick: h,
|
|
202
|
+
onRetry: ze,
|
|
203
|
+
isPaginationVisible: T && Ne && !X,
|
|
204
|
+
pageSize: R,
|
|
205
|
+
pageSizeOptions: me,
|
|
206
|
+
isPreviousPageDisabled: !Y,
|
|
207
|
+
isNextPageDisabled: !J,
|
|
208
|
+
onPageSizeChange: Pe,
|
|
209
|
+
onPreviousPageClick: Ie,
|
|
210
|
+
onNextPageClick: Le
|
|
205
211
|
};
|
|
206
212
|
}
|
|
207
213
|
//#endregion
|
|
208
|
-
export {
|
|
214
|
+
export { d as useCardsWidget };
|
|
@@ -28,7 +28,7 @@ function c({ row: e, labels: t }) {
|
|
|
28
28
|
})
|
|
29
29
|
]
|
|
30
30
|
}), /* @__PURE__ */ o("span", {
|
|
31
|
-
className: "ttw:truncate ttw:text-xs ttw:
|
|
31
|
+
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
32
32
|
children: e.typeLabel
|
|
33
33
|
})]
|
|
34
34
|
})] });
|
|
@@ -42,9 +42,19 @@ function l({ row: i, columns: a, labels: l }) {
|
|
|
42
42
|
labels: l
|
|
43
43
|
})
|
|
44
44
|
}),
|
|
45
|
-
fundingAccount: /* @__PURE__ */
|
|
46
|
-
className: "ttw:
|
|
47
|
-
children:
|
|
45
|
+
fundingAccount: /* @__PURE__ */ s("span", {
|
|
46
|
+
className: "ttw:flex ttw:min-w-0 ttw:items-baseline ttw:gap-1 ttw:text-sm",
|
|
47
|
+
children: [/* @__PURE__ */ o("span", {
|
|
48
|
+
className: "ttw:truncate ttw:text-foreground",
|
|
49
|
+
children: i.fundingAccount
|
|
50
|
+
}), i.fundingAccountLastFour && /* @__PURE__ */ s("span", {
|
|
51
|
+
className: "ttw:shrink-0 ttw:text-muted-foreground",
|
|
52
|
+
children: [
|
|
53
|
+
l.cardNameSeparator,
|
|
54
|
+
" ",
|
|
55
|
+
i.fundingAccountLastFour
|
|
56
|
+
]
|
|
57
|
+
})]
|
|
48
58
|
}),
|
|
49
59
|
cardholder: /* @__PURE__ */ o("span", {
|
|
50
60
|
className: "ttw:text-sm ttw:text-foreground",
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js
CHANGED
|
@@ -21,7 +21,7 @@ var t = {
|
|
|
21
21
|
noLimit: "No limit",
|
|
22
22
|
loadingLabel: "Loading cards",
|
|
23
23
|
emptyTitle: "No cards created yet",
|
|
24
|
-
emptyDescription: "No cards have been created yet. Click the Create card button to create your first physical or
|
|
24
|
+
emptyDescription: "No cards have been created yet. Click the Create card button to create your first physical or virtual, debit or credit card.",
|
|
25
25
|
errorTitle: "Unable to load cards",
|
|
26
26
|
errorDescription: "Something went wrong while fetching your cards. Please try again.",
|
|
27
27
|
retryButton: "Try again",
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js
CHANGED
|
@@ -10,7 +10,7 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as a } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js
|
|
12
12
|
function o({ metric: n = "total_amount", type: o, statusIn: s, counterpartIdIn: c, enabled: l } = {}) {
|
|
13
|
-
let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = e(), m = c
|
|
13
|
+
let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = e(), m = c == null || c.length > 0, h = !!(d && f) && m && (l === !0 || l === void 0), g = r({
|
|
14
14
|
client: u,
|
|
15
15
|
headers: t(d),
|
|
16
16
|
query: {
|
|
@@ -28,7 +28,7 @@ function o({ metric: n = "total_amount", type: o, statusIn: s, counterpartIdIn:
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function s({ metric: r = "total_amount", statusIn: o, counterpartIdIn: s, enabled: c } = {}) {
|
|
31
|
-
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = s
|
|
31
|
+
let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = s == null || s.length > 0, m = !!(u && d) && p && (c === !0 || c === void 0), h = n({
|
|
32
32
|
client: l,
|
|
33
33
|
headers: t(u),
|
|
34
34
|
query: {
|
|
@@ -22,15 +22,9 @@ function _({ cardArtSrc: _, labels: v, cardholderOptions: y, selectedCardholder:
|
|
|
22
22
|
children: [/* @__PURE__ */ g("section", {
|
|
23
23
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
className: "ttw:
|
|
27
|
-
children:
|
|
28
|
-
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
29
|
-
children: v.setup.sectionTitle
|
|
30
|
-
}), /* @__PURE__ */ h("p", {
|
|
31
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
32
|
-
children: v.setup.sectionDescription
|
|
33
|
-
})]
|
|
25
|
+
/* @__PURE__ */ h("h3", {
|
|
26
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
27
|
+
children: v.setup.sectionTitle
|
|
34
28
|
}),
|
|
35
29
|
/* @__PURE__ */ g("div", {
|
|
36
30
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
@@ -7,7 +7,6 @@ var e = {
|
|
|
7
7
|
cardArtAlt: "Card preview",
|
|
8
8
|
setup: {
|
|
9
9
|
sectionTitle: "Set up your card",
|
|
10
|
-
sectionDescription: "Please select an enrolled employee to issue a card to. To invite an employee to enroll, please navigate to the Team Members menu.",
|
|
11
10
|
cardholderLabel: "Cardholder",
|
|
12
11
|
cardholderPlaceholder: "Select team member",
|
|
13
12
|
cardFormatLabel: "Card format",
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js
CHANGED
|
@@ -56,9 +56,9 @@ function b({ onEdit: r, onDelete: o, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
56
56
|
}, [P, B]), K = f((e) => {
|
|
57
57
|
L(e), z(void 0);
|
|
58
58
|
}, []), q = f(() => {
|
|
59
|
-
z(U?.next_pagination_token);
|
|
59
|
+
z(U?.next_pagination_token ?? void 0);
|
|
60
60
|
}, [U?.next_pagination_token]), J = f(() => {
|
|
61
|
-
z(U?.prev_pagination_token);
|
|
61
|
+
z(U?.prev_pagination_token ?? void 0);
|
|
62
62
|
}, [U?.prev_pagination_token]);
|
|
63
63
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(c, {
|
|
64
64
|
...T,
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js
CHANGED
|
@@ -38,7 +38,7 @@ function l({ activeTab: l, messages: d }) {
|
|
|
38
38
|
h(e), _(void 0);
|
|
39
39
|
}, []), F = i((e) => {
|
|
40
40
|
C(e), _(void 0);
|
|
41
|
-
}, []), I = i(() => _(D.data?.next_pagination_token), [D.data?.next_pagination_token]), L = i(() => _(D.data?.prev_pagination_token), [D.data?.prev_pagination_token]), R = i(() => {
|
|
41
|
+
}, []), I = i(() => _(D.data?.next_pagination_token ?? void 0), [D.data?.next_pagination_token]), L = i(() => _(D.data?.prev_pagination_token ?? void 0), [D.data?.prev_pagination_token]), R = i(() => {
|
|
42
42
|
D.refetch();
|
|
43
43
|
}, [D]);
|
|
44
44
|
return {
|
|
@@ -160,7 +160,7 @@ function v({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
|
|
|
160
160
|
currency: e.currency,
|
|
161
161
|
fallback: i.notAvailable
|
|
162
162
|
}),
|
|
163
|
-
pdfUrl: r || e.file_url || e.original_file_url,
|
|
163
|
+
pdfUrl: r || e.file_url || e.original_file_url || void 0,
|
|
164
164
|
summaryItems: [
|
|
165
165
|
{
|
|
166
166
|
label: i.summaryDocumentType,
|
|
@@ -22,7 +22,7 @@ function o({ selectedReceivableId: o, enabled: s = !0, messages: c }) {
|
|
|
22
22
|
receivable: l.data,
|
|
23
23
|
history: u.data?.data ?? [],
|
|
24
24
|
mails: d.data?.data ?? [],
|
|
25
|
-
pdfUrl: f.data?.file_url || f.data?.original_file_url,
|
|
25
|
+
pdfUrl: f.data?.file_url || f.data?.original_file_url || void 0,
|
|
26
26
|
messages: c
|
|
27
27
|
}), [
|
|
28
28
|
l.data,
|
|
@@ -33,7 +33,7 @@ function o({ unitNamesById: o }) {
|
|
|
33
33
|
c(t), f(void 0);
|
|
34
34
|
}, [s]), D = n((e) => {
|
|
35
35
|
u(e), f(void 0);
|
|
36
|
-
}, []), O = n(() => f(C.data?.next_pagination_token), [C.data?.next_pagination_token]), k = n(() => f(C.data?.prev_pagination_token), [C.data?.prev_pagination_token]), A = n(() => {
|
|
36
|
+
}, []), O = n(() => f(C.data?.next_pagination_token ?? void 0), [C.data?.next_pagination_token]), k = n(() => f(C.data?.prev_pagination_token ?? void 0), [C.data?.prev_pagination_token]), A = n(() => {
|
|
37
37
|
C.refetch();
|
|
38
38
|
}, [C]), j = n((e) => (t) => {
|
|
39
39
|
e(t), f(void 0);
|