@tesouro/embedded-components-react 0.3.9 → 0.3.11
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/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +846 -817
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -96,20 +96,21 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
96
96
|
A,
|
|
97
97
|
k
|
|
98
98
|
]);
|
|
99
|
-
let L = A ? Se : ke ? j : E, Ae = L.paginationToken, R = L.pageSize, z = {
|
|
99
|
+
let L = A ? Se : ke ? j : E, Ae = L.paginationToken, R = L.pageSize, z = I ? x : void 0, B = {
|
|
100
100
|
limit: R,
|
|
101
|
-
paginationToken: Ae
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
paginationToken: Ae
|
|
102
|
+
}, V = ue({
|
|
103
|
+
...B,
|
|
104
|
+
userId: z,
|
|
105
105
|
enabled: T && c === r.Credit
|
|
106
|
-
}),
|
|
107
|
-
...
|
|
106
|
+
}), H = de({
|
|
107
|
+
...B,
|
|
108
|
+
cardholderUserId: z,
|
|
108
109
|
enabled: T && c === r.Debit
|
|
109
|
-
}),
|
|
110
|
+
}), U = c === r.Credit ? V : H, W = T && w.canReadFundingAccounts, G = e({ enabled: W }), K = o(() => {
|
|
110
111
|
let e = /* @__PURE__ */ new Map();
|
|
111
112
|
if (!w.canReadFundingAccounts) return e;
|
|
112
|
-
for (let t of
|
|
113
|
+
for (let t of G.data?.data ?? []) {
|
|
113
114
|
let n = t.nickname?.trim();
|
|
114
115
|
e.set(t.id, n ? {
|
|
115
116
|
name: n,
|
|
@@ -118,28 +119,28 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
118
119
|
}
|
|
119
120
|
return e;
|
|
120
121
|
}, [
|
|
121
|
-
|
|
122
|
+
G.data?.data,
|
|
122
123
|
_.untitledFundingAccount,
|
|
123
124
|
w.canReadFundingAccounts
|
|
124
|
-
]),
|
|
125
|
+
]), q = W && G.isError, je = W && !q && (G.isLoading || G.isFetchingNextPage || !!G.hasNextPage), J = o(() => T ? c === r.Credit ? ce(V.data?.data ?? []) : le(H.data?.data ?? []) : [], [
|
|
125
126
|
T,
|
|
126
127
|
c,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
]), Me = o(() => se(
|
|
128
|
+
V.data?.data,
|
|
129
|
+
H.data?.data
|
|
130
|
+
]), Me = o(() => se(J, {
|
|
130
131
|
labels: _,
|
|
131
|
-
fundingAccountNames:
|
|
132
|
+
fundingAccountNames: K,
|
|
132
133
|
canActivate: w.canActivate,
|
|
133
134
|
onCardSelect: F,
|
|
134
135
|
onActivateCard: g
|
|
135
136
|
}), [
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
J,
|
|
138
|
+
K,
|
|
138
139
|
F,
|
|
139
140
|
_,
|
|
140
141
|
g,
|
|
141
142
|
w.canActivate
|
|
142
|
-
]),
|
|
143
|
+
]), Y = U.data?.nextPaginationToken ?? void 0, X = U.data?.prevPaginationToken ?? void 0, Ne = !!U.data, Z = T && (U.isError || q), Q = i((e) => {
|
|
143
144
|
A || M({
|
|
144
145
|
resetKey: k,
|
|
145
146
|
paginationToken: e.paginationToken,
|
|
@@ -149,42 +150,42 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
149
150
|
A,
|
|
150
151
|
p,
|
|
151
152
|
k
|
|
152
|
-
]),
|
|
153
|
-
|
|
153
|
+
]), $ = i(() => {
|
|
154
|
+
Q({
|
|
154
155
|
paginationToken: void 0,
|
|
155
156
|
pageSize: R
|
|
156
157
|
});
|
|
157
|
-
}, [
|
|
158
|
-
|
|
158
|
+
}, [Q, R]), Pe = i((e) => {
|
|
159
|
+
Q({
|
|
159
160
|
paginationToken: void 0,
|
|
160
161
|
pageSize: e
|
|
161
162
|
});
|
|
162
|
-
}, [
|
|
163
|
-
Ee(e),
|
|
164
|
-
}, [
|
|
165
|
-
|
|
166
|
-
paginationToken:
|
|
163
|
+
}, [Q]), Fe = i((e) => {
|
|
164
|
+
Ee(e), $();
|
|
165
|
+
}, [$]), Ie = i(() => {
|
|
166
|
+
Q({
|
|
167
|
+
paginationToken: X,
|
|
167
168
|
pageSize: R
|
|
168
169
|
});
|
|
169
170
|
}, [
|
|
170
|
-
|
|
171
|
+
Q,
|
|
171
172
|
R,
|
|
172
|
-
|
|
173
|
+
X
|
|
173
174
|
]), Le = i(() => {
|
|
174
|
-
|
|
175
|
-
paginationToken:
|
|
175
|
+
Q({
|
|
176
|
+
paginationToken: Y,
|
|
176
177
|
pageSize: R
|
|
177
178
|
});
|
|
178
179
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
Q,
|
|
181
|
+
Y,
|
|
181
182
|
R
|
|
182
|
-
]),
|
|
183
|
-
|
|
183
|
+
]), Re = U.refetch, ze = G.refetch, Be = i(() => {
|
|
184
|
+
Re(), W && ze();
|
|
184
185
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
W,
|
|
187
|
+
Re,
|
|
188
|
+
ze
|
|
188
189
|
]);
|
|
189
190
|
return {
|
|
190
191
|
rows: Me,
|
|
@@ -192,19 +193,19 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
192
193
|
onSelectCard: F,
|
|
193
194
|
canReadCards: w.canRead,
|
|
194
195
|
columns: oe[c],
|
|
195
|
-
isLoading: !S && (!C || xe && !b || T && (
|
|
196
|
-
isError: S ||
|
|
196
|
+
isLoading: !S && (!C || xe && !b || T && (U.isLoading || je)),
|
|
197
|
+
isError: S || Z,
|
|
197
198
|
canToggleShowMyCards: w.canRead && !!x,
|
|
198
199
|
isShowingMyCards: I,
|
|
199
200
|
onShowMyCardsChange: Fe,
|
|
200
201
|
canCreateCard: w.canCreate && (!!h || !!ye && w.canComposeDebitCreate),
|
|
201
202
|
onCreateCardClick: h,
|
|
202
|
-
onRetry:
|
|
203
|
-
isPaginationVisible: T && Ne && !
|
|
203
|
+
onRetry: Be,
|
|
204
|
+
isPaginationVisible: T && Ne && !Z,
|
|
204
205
|
pageSize: R,
|
|
205
206
|
pageSizeOptions: me,
|
|
206
|
-
isPreviousPageDisabled: !
|
|
207
|
-
isNextPageDisabled: !
|
|
207
|
+
isPreviousPageDisabled: !X,
|
|
208
|
+
isNextPageDisabled: !Y,
|
|
208
209
|
onPageSizeChange: Pe,
|
|
209
210
|
onPreviousPageClick: Ie,
|
|
210
211
|
onNextPageClick: Le
|