@tesouro/embedded-components-react 0.9.9 → 0.9.15
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/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +116 -113
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/isDisclosuresAcceptanceRequired.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -74,6 +74,7 @@ function d({ labels: d, componentLabels: f, headingComponent: p = "h3", showHead
|
|
|
74
74
|
onConfirm: g.deleteDialog.onConfirm,
|
|
75
75
|
onCancel: g.deleteDialog.onCancel,
|
|
76
76
|
isDeleting: g.deleteDialog.isDeleting,
|
|
77
|
+
confirmDisabled: g.deleteDialog.confirmDisabled,
|
|
77
78
|
labels: f?.deleteDialog,
|
|
78
79
|
testIds: {
|
|
79
80
|
root: r.deleteDialog,
|
|
@@ -3,56 +3,57 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { OrganizationStatus as t, isOrganizationOnItsWay as n } from "../../../../data-access/dist/lib/organizationStatus.js";
|
|
7
|
+
import { useEmbedApi as r } from "../../../../data-access/dist/lib/EmbedApiContext.js";
|
|
7
8
|
import "../../../../data-access/dist/index.js";
|
|
8
9
|
import "../../../../ui/dist/index.js";
|
|
9
|
-
import { computeUncoveredAmountRanges as
|
|
10
|
-
import { nextPolicyPriority as
|
|
11
|
-
import { buildApprovalPolicyScript as
|
|
12
|
-
import { buildApprovalPolicyTrigger as
|
|
13
|
-
import { validatePolicyDraft as
|
|
14
|
-
import { buildPolicySentence as
|
|
15
|
-
import { useApproverOptions as
|
|
16
|
-
import { approvalPolicyTestIds as
|
|
17
|
-
import { ApprovalPolicyObjectType as
|
|
18
|
-
import { useDeleteApprovalPoliciesIdMutation as
|
|
10
|
+
import { computeUncoveredAmountRanges as i } from "../../../util/dist/lib/amountCoverage.js";
|
|
11
|
+
import { nextPolicyPriority as a } from "../../../util/dist/lib/policyPriority.js";
|
|
12
|
+
import { buildApprovalPolicyScript as ee, parseApprovalPolicyScript as o } from "../../../util/dist/lib/policyScript.js";
|
|
13
|
+
import { buildApprovalPolicyTrigger as te, parseApprovalPolicyTrigger as s } from "../../../util/dist/lib/policyTrigger.js";
|
|
14
|
+
import { validatePolicyDraft as ne } from "../../../util/dist/lib/validatePolicyDraft.js";
|
|
15
|
+
import { buildPolicySentence as re, buildPolicyTitle as c, buildUnlistedPoliciesHeading as ie, gapId as ae, lockUnavailableApprovers as oe, toAmountConditionErrors as l, toAmountConditionValue as u, toApproverErrors as se, toApproverGroupRefs as ce, toApproverSteps as le, toGapRanges as d } from "./policyViewModel.js";
|
|
16
|
+
import { useApproverOptions as f } from "./useApproverOptions.js";
|
|
17
|
+
import { approvalPolicyTestIds as p } from "./testIds.js";
|
|
18
|
+
import { ApprovalPolicyObjectType as ue } from "../../../data-access/dist/lib/queryKeys.js";
|
|
19
|
+
import { useDeleteApprovalPoliciesIdMutation as de, useGetApprovalPoliciesQuery as fe, usePatchApprovalPoliciesIdMutation as pe, usePostApprovalPoliciesMutation as me } from "../../../data-access/dist/lib/approvalPoliciesApi.js";
|
|
19
20
|
import "../../../data-access/dist/index.js";
|
|
20
|
-
import { useCallback as
|
|
21
|
+
import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
21
22
|
//#region ../../libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js
|
|
22
|
-
var
|
|
23
|
+
var y = "draft", he = {
|
|
23
24
|
lower: "",
|
|
24
25
|
upper: ""
|
|
25
|
-
},
|
|
26
|
+
}, b = {
|
|
26
27
|
lower: !1,
|
|
27
28
|
upper: !1
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
+
function ge(e) {
|
|
30
31
|
return e.map((e) => {
|
|
31
|
-
let t = s(e.trigger), n =
|
|
32
|
+
let t = s(e.trigger), n = o(e.script), r = t.currency === void 0 || t.currency === "USD", i = e.status === "active", a = t.hasKnownAmountBounds && r;
|
|
32
33
|
return {
|
|
33
34
|
id: e.id,
|
|
34
35
|
priority: e.priority,
|
|
35
36
|
condition: t.condition,
|
|
36
37
|
groups: n.groups,
|
|
37
38
|
isRepresentable: t.isSupported && t.hasWrittenGuards && n.isSupported && r && i,
|
|
38
|
-
hasKnownCondition:
|
|
39
|
+
hasKnownCondition: a,
|
|
39
40
|
isActive: i,
|
|
40
|
-
coversNow:
|
|
41
|
+
coversNow: a && i
|
|
41
42
|
};
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function x(e) {
|
|
45
46
|
return [...e].sort((e, t) => (e.condition.min ?? 0) - (t.condition.min ?? 0));
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
let N =
|
|
48
|
+
function S({ labels: o, componentLabels: s }) {
|
|
49
|
+
let y = fe(), S = me(), C = pe(), w = de(), T = f(), { organizationId: E, organizationStatus: D } = r(), [O, k] = v(null), [A, j] = v(null), _e = n(D), M = _(E);
|
|
50
|
+
E && E !== M.current && (M.current = E, k(null), j(null)), D === t.None && (O || A) && (k(null), j(null));
|
|
51
|
+
let N = _(0), P = m(() => (N.current += 1, {
|
|
51
52
|
id: `group-new-${N.current}`,
|
|
52
53
|
selectedItems: []
|
|
53
|
-
}), []), F =
|
|
54
|
+
}), []), F = g(() => ge(y.data?.data ?? []), [y.data]), I = g(() => T.isResolving ? [] : x(F.flatMap((e) => {
|
|
54
55
|
if (!e.isRepresentable) return [];
|
|
55
|
-
let t =
|
|
56
|
+
let t = le(e.groups, T.lookup);
|
|
56
57
|
return t === void 0 ? [] : [{
|
|
57
58
|
id: e.id,
|
|
58
59
|
priority: e.priority,
|
|
@@ -61,20 +62,20 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
61
62
|
}];
|
|
62
63
|
})), [
|
|
63
64
|
F,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
]), L = O ? O.policyId ?? "draft" : null, R =
|
|
67
|
-
|
|
68
|
-
z && (k(null), e.error(
|
|
69
|
-
}, [z,
|
|
70
|
-
let B =
|
|
65
|
+
T.isResolving,
|
|
66
|
+
T.lookup
|
|
67
|
+
]), L = O ? O.policyId ?? "draft" : null, R = _e || y.isResolving || T.isResolving, z = O?.policyId != null && O.policyId !== A && !!E && !R && !I.some((e) => e.id === O.policyId);
|
|
68
|
+
h(() => {
|
|
69
|
+
z && (k(null), e.error(o.approverUnavailable));
|
|
70
|
+
}, [z, o.approverUnavailable]);
|
|
71
|
+
let B = g(() => new Set(I.map((e) => e.id)), [I]), V = g(() => R ? [] : F.filter((e) => !B.has(e.id)), [
|
|
71
72
|
R,
|
|
72
73
|
F,
|
|
73
74
|
B
|
|
74
|
-
]), H =
|
|
75
|
+
]), H = g(() => {
|
|
75
76
|
if (!O) return;
|
|
76
77
|
let e = (e) => e.id !== O.policyId;
|
|
77
|
-
return
|
|
78
|
+
return ne({
|
|
78
79
|
amount: O.amount,
|
|
79
80
|
groups: O.steps.map((e) => ({
|
|
80
81
|
id: e.id,
|
|
@@ -87,30 +88,30 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
87
88
|
O,
|
|
88
89
|
I,
|
|
89
90
|
V
|
|
90
|
-
]), U =
|
|
91
|
+
]), U = g(() => i(F.filter((e) => e.coversNow).map((e) => e.condition)), [F]), W = g(() => F.filter((e) => e.hasKnownCondition).map((e) => e.condition), [F]), G = g(() => F.length === 0 ? [] : d(U, o, W), [
|
|
91
92
|
F.length,
|
|
92
93
|
U,
|
|
93
|
-
|
|
94
|
+
o,
|
|
94
95
|
W
|
|
95
|
-
]),
|
|
96
|
-
|
|
96
|
+
]), ve = g(() => i(W), [W]), ye = !R && F.length > 0 && ve.length === 0 ? I.length === 0 ? o.addRuleFullyCoveredUnlisted : o.addRuleFullyCovered : void 0, [K, be] = v(0), q = _(null);
|
|
97
|
+
h(() => {
|
|
97
98
|
K !== 0 && q.current?.scrollIntoView({
|
|
98
99
|
behavior: globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
99
100
|
block: "nearest"
|
|
100
101
|
});
|
|
101
102
|
}, [K]);
|
|
102
|
-
let J =
|
|
103
|
+
let J = m((e) => {
|
|
103
104
|
k({
|
|
104
105
|
policyId: null,
|
|
105
106
|
amount: e,
|
|
106
107
|
steps: [P()],
|
|
107
|
-
touchedAmount:
|
|
108
|
-
}),
|
|
109
|
-
}, [P]),
|
|
110
|
-
J(
|
|
111
|
-
}, [J]),
|
|
112
|
-
let t = U.find((t) =>
|
|
113
|
-
t && G.find((t) => t.id === e)?.blockedReason === void 0 && J(
|
|
108
|
+
touchedAmount: b
|
|
109
|
+
}), be((e) => e + 1);
|
|
110
|
+
}, [P]), xe = m(() => {
|
|
111
|
+
J(he);
|
|
112
|
+
}, [J]), Se = m((e) => {
|
|
113
|
+
let t = U.find((t) => ae(t) === e);
|
|
114
|
+
t && G.find((t) => t.id === e)?.blockedReason === void 0 && J(u({
|
|
114
115
|
type: "between",
|
|
115
116
|
min: t.min,
|
|
116
117
|
max: t.max
|
|
@@ -119,55 +120,56 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
119
120
|
U,
|
|
120
121
|
G,
|
|
121
122
|
J
|
|
122
|
-
]), Y =
|
|
123
|
+
]), Y = m(() => {
|
|
123
124
|
k(null);
|
|
124
|
-
}, []), X =
|
|
125
|
+
}, []), X = S.isPending || C.isPending || w.isPending, Z = m(async () => {
|
|
125
126
|
if (!O || !H || !H.isValid) return;
|
|
126
|
-
let t = H.condition, n =
|
|
127
|
+
let t = H.condition, n = ce(O.steps, T.lookup);
|
|
127
128
|
if (!n) {
|
|
128
|
-
e.error(
|
|
129
|
+
e.error(o.approverUnavailable);
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
|
-
let
|
|
132
|
+
let r = te(t), i = ee(n), s = c(t, o);
|
|
132
133
|
try {
|
|
133
|
-
O.policyId === null ? await
|
|
134
|
-
object_type:
|
|
135
|
-
name:
|
|
136
|
-
trigger:
|
|
137
|
-
script:
|
|
138
|
-
priority:
|
|
139
|
-
} }) : await
|
|
134
|
+
O.policyId === null ? await S.mutateAsync({ body: {
|
|
135
|
+
object_type: ue.Payable,
|
|
136
|
+
name: s,
|
|
137
|
+
trigger: r,
|
|
138
|
+
script: i,
|
|
139
|
+
priority: a(F.map((e) => e.priority))
|
|
140
|
+
} }) : await C.mutateAsync({
|
|
140
141
|
path: { approval_policy_id: O.policyId },
|
|
141
142
|
body: {
|
|
142
|
-
name:
|
|
143
|
-
trigger:
|
|
144
|
-
script:
|
|
143
|
+
name: s,
|
|
144
|
+
trigger: r,
|
|
145
|
+
script: i
|
|
145
146
|
}
|
|
146
|
-
}), k(null), e.success(
|
|
147
|
+
}), k(null), e.success(o.ruleSaved);
|
|
147
148
|
} catch {
|
|
148
|
-
e.error(
|
|
149
|
+
e.error(o.ruleSaveFailed);
|
|
149
150
|
}
|
|
150
151
|
}, [
|
|
151
152
|
O,
|
|
152
153
|
H,
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
T.lookup,
|
|
155
|
+
o,
|
|
155
156
|
F,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
]),
|
|
159
|
-
if (A) try {
|
|
160
|
-
await
|
|
157
|
+
S,
|
|
158
|
+
C
|
|
159
|
+
]), Ce = m(async () => {
|
|
160
|
+
if (A && E) try {
|
|
161
|
+
await w.mutateAsync({ path: { approval_policy_id: A } }), j(null), k(null), e.success(o.ruleDeleted);
|
|
161
162
|
} catch {
|
|
162
|
-
j(null), e.error(
|
|
163
|
+
j(null), e.error(o.ruleDeleteFailed);
|
|
163
164
|
}
|
|
164
165
|
}, [
|
|
165
166
|
A,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
E,
|
|
168
|
+
w,
|
|
169
|
+
o
|
|
170
|
+
]), we = R || X || !E, Q = g(() => {
|
|
169
171
|
if (!O || !H || X) return;
|
|
170
|
-
let e =
|
|
172
|
+
let e = l(H.amountErrors, o);
|
|
171
173
|
if (e) return {
|
|
172
174
|
lower: O.touchedAmount.lower ? e.lower : void 0,
|
|
173
175
|
upper: O.touchedAmount.upper ? e.upper : void 0
|
|
@@ -176,18 +178,18 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
176
178
|
O,
|
|
177
179
|
H,
|
|
178
180
|
X,
|
|
179
|
-
|
|
180
|
-
]), $ =
|
|
181
|
+
o
|
|
182
|
+
]), $ = g(() => {
|
|
181
183
|
if (!H || H.isValid) return;
|
|
182
|
-
let e =
|
|
184
|
+
let e = se(H.groupErrors, o), t = l(H.amountErrors, o), n = [
|
|
183
185
|
...Object.values(e?.steps ?? {}),
|
|
184
186
|
t?.lower,
|
|
185
187
|
t?.upper
|
|
186
188
|
].filter((e) => !!e), r = [...new Set(n)];
|
|
187
189
|
return r.length > 0 ? r : void 0;
|
|
188
|
-
}, [H,
|
|
190
|
+
}, [H, o]);
|
|
189
191
|
return {
|
|
190
|
-
items:
|
|
192
|
+
items: g(() => {
|
|
191
193
|
let e = {
|
|
192
194
|
onAmountConditionChange: (e) => k((t) => t && {
|
|
193
195
|
...t,
|
|
@@ -212,46 +214,46 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
212
214
|
...t,
|
|
213
215
|
steps: t.steps.filter((t) => t.id !== e)
|
|
214
216
|
})
|
|
215
|
-
}, t = (t, n, r, i,
|
|
217
|
+
}, t = (t, n, r, i, a) => ({
|
|
216
218
|
id: t,
|
|
217
|
-
title:
|
|
218
|
-
sentence:
|
|
219
|
-
approverSteps: r.map((e) =>
|
|
220
|
-
lookup:
|
|
221
|
-
labels:
|
|
219
|
+
title: c(n, o),
|
|
220
|
+
sentence: re(n, o),
|
|
221
|
+
approverSteps: r.map((e) => oe(e, {
|
|
222
|
+
lookup: T.lookup,
|
|
223
|
+
labels: o,
|
|
222
224
|
usedByOtherSteps: i ? new Set(r.filter((t) => t.id !== e.id).flatMap((e) => e.selectedItems.map((e) => e.id))) : void 0
|
|
223
225
|
})),
|
|
224
226
|
addApproverStepDisabled: r.some((e) => e.selectedItems.length === 0),
|
|
225
|
-
approverOptions:
|
|
226
|
-
amountCondition:
|
|
227
|
+
approverOptions: T.options,
|
|
228
|
+
amountCondition: u(n),
|
|
227
229
|
amountConditionErrors: i ? Q : void 0,
|
|
228
230
|
onEdit: () => {
|
|
229
231
|
k({
|
|
230
232
|
policyId: t,
|
|
231
|
-
amount:
|
|
233
|
+
amount: u(n),
|
|
232
234
|
steps: r,
|
|
233
|
-
touchedAmount:
|
|
235
|
+
touchedAmount: b
|
|
234
236
|
});
|
|
235
237
|
},
|
|
236
238
|
onCancel: Y,
|
|
237
239
|
onSave: () => void Z(),
|
|
238
|
-
onDelete:
|
|
240
|
+
onDelete: a,
|
|
239
241
|
saveDisabled: i && H ? !H.isValid : !1,
|
|
240
242
|
saveDisabledReasons: i ? $ : void 0,
|
|
241
243
|
labels: s?.policyCard,
|
|
242
244
|
testIds: {
|
|
243
245
|
amountConditionBuilder: {
|
|
244
|
-
root:
|
|
245
|
-
lowerInput:
|
|
246
|
-
upperInput:
|
|
246
|
+
root: p.amountConditionBuilder,
|
|
247
|
+
lowerInput: p.amountConditionLowerInput,
|
|
248
|
+
upperInput: p.amountConditionUpperInput
|
|
247
249
|
},
|
|
248
250
|
approverGroupsBuilder: {
|
|
249
|
-
root:
|
|
250
|
-
loading:
|
|
251
|
-
error:
|
|
252
|
-
description:
|
|
253
|
-
empty:
|
|
254
|
-
addStepButton:
|
|
251
|
+
root: p.approverGroupsBuilder,
|
|
252
|
+
loading: p.approverGroupsLoading,
|
|
253
|
+
error: p.approverGroupsError,
|
|
254
|
+
description: p.approverGroupsDescription,
|
|
255
|
+
empty: p.approverGroupsEmpty,
|
|
256
|
+
addStepButton: p.approverGroupsAddStep
|
|
255
257
|
}
|
|
256
258
|
},
|
|
257
259
|
...e
|
|
@@ -274,38 +276,39 @@ function C({ labels: a, componentLabels: s }) {
|
|
|
274
276
|
Q,
|
|
275
277
|
$,
|
|
276
278
|
H,
|
|
277
|
-
|
|
279
|
+
o,
|
|
278
280
|
s?.policyCard,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
+
T.options,
|
|
282
|
+
T.lookup,
|
|
281
283
|
Y,
|
|
282
284
|
P,
|
|
283
285
|
Z
|
|
284
286
|
]),
|
|
285
287
|
editingId: L,
|
|
286
288
|
gaps: G,
|
|
287
|
-
unlistedPoliciesHeading:
|
|
289
|
+
unlistedPoliciesHeading: ie(V.length, o),
|
|
288
290
|
unlistedPoliciesBlockAmounts: V.some((e) => e.hasKnownCondition),
|
|
289
291
|
unlistedPoliciesStillApply: V.some((e) => e.isActive),
|
|
290
|
-
onAddRule:
|
|
291
|
-
addRuleDisabledReason:
|
|
292
|
-
onSelectGap:
|
|
293
|
-
isBusy:
|
|
292
|
+
onAddRule: xe,
|
|
293
|
+
addRuleDisabledReason: ye,
|
|
294
|
+
onSelectGap: Se,
|
|
295
|
+
isBusy: we,
|
|
294
296
|
isLoading: R,
|
|
295
|
-
isError:
|
|
297
|
+
isError: y.isError || T.isError,
|
|
296
298
|
onRetry: () => {
|
|
297
|
-
|
|
299
|
+
y.refetch(), T.refetch();
|
|
298
300
|
},
|
|
299
301
|
deleteDialog: {
|
|
300
302
|
open: A !== null,
|
|
301
|
-
isDeleting:
|
|
303
|
+
isDeleting: w.isPending,
|
|
304
|
+
confirmDisabled: !E,
|
|
302
305
|
onOpenChange: (e) => {
|
|
303
306
|
e || j(null);
|
|
304
307
|
},
|
|
305
|
-
onConfirm: () => void
|
|
308
|
+
onConfirm: () => void Ce(),
|
|
306
309
|
onCancel: () => j(null)
|
|
307
310
|
}
|
|
308
311
|
};
|
|
309
312
|
}
|
|
310
313
|
//#endregion
|
|
311
|
-
export {
|
|
314
|
+
export { y as DRAFT_POLICY_ID, S as useApprovalPolicyRules };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js
CHANGED
|
@@ -4,16 +4,16 @@ 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,
|
|
8
|
-
let
|
|
7
|
+
var f = ({ open: f, onOpenChange: p, onConfirm: m, onCancel: h, isDeleting: g, confirmDisabled: _, labels: v, testIds: y }) => {
|
|
8
|
+
let b = c(() => ({
|
|
9
9
|
...s,
|
|
10
|
-
...
|
|
11
|
-
}), [
|
|
10
|
+
...v
|
|
11
|
+
}), [v]);
|
|
12
12
|
return /* @__PURE__ */ l(e, {
|
|
13
13
|
open: f,
|
|
14
14
|
onOpenChange: p,
|
|
15
15
|
children: /* @__PURE__ */ u(t, {
|
|
16
|
-
"data-testid":
|
|
16
|
+
"data-testid": y?.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: b.Title }),
|
|
29
|
+
/* @__PURE__ */ l(n, { children: b.Description })
|
|
30
30
|
]
|
|
31
31
|
}), /* @__PURE__ */ u(r, {
|
|
32
32
|
className: "ttw:sm:justify-center",
|
|
@@ -36,17 +36,17 @@ 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": y?.cancelButton,
|
|
40
|
+
children: b.Cancel
|
|
41
41
|
}), /* @__PURE__ */ u(o, {
|
|
42
42
|
type: "button",
|
|
43
43
|
variant: "destructive",
|
|
44
44
|
onClick: m,
|
|
45
|
-
disabled: g,
|
|
45
|
+
disabled: g || _,
|
|
46
46
|
loading: g,
|
|
47
47
|
className: "ttw:flex-1",
|
|
48
|
-
"data-testid":
|
|
49
|
-
children: [/* @__PURE__ */ l(d, {}),
|
|
48
|
+
"data-testid": y?.confirmButton,
|
|
49
|
+
children: [/* @__PURE__ */ l(d, {}), b.Delete]
|
|
50
50
|
})]
|
|
51
51
|
})]
|
|
52
52
|
})
|
|
@@ -7,7 +7,7 @@ var e = "widget-disclosures-required", t = /* @__PURE__ */ new Set([
|
|
|
7
7
|
"banking_compliance_banner"
|
|
8
8
|
]);
|
|
9
9
|
function n(e) {
|
|
10
|
-
return e?.disclosuresRequired === "REQUIRED" && e?.disclosuresAccepted === !1;
|
|
10
|
+
return e?.status !== "NOT_FOUND" && e?.disclosuresRequired === "REQUIRED" && e?.disclosuresAccepted === !1;
|
|
11
11
|
}
|
|
12
12
|
function r(e) {
|
|
13
13
|
return e !== void 0 && t.has(e);
|
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.9.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.9.15", n = "d9c2dc4232aff9427503b25340d94b5eb80c8901", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|