@tesouro/embedded-components-react 0.6.5 → 0.7.1
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/README.md +0 -1
- package/dist/index.css +3 -0
- package/dist/index.d.ts +13 -12
- package/dist/lib/ExpenseManagementWidget.d.ts +1 -0
- package/dist/lib/SettingsWidget.d.ts +2 -12
- package/dist/lib/WidgetSuite.d.ts +2 -11
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/lib/useTrackReceiptMatching.js +126 -73
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +185 -182
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +187 -180
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +86 -84
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +110 -100
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -23
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -6,14 +6,14 @@ import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTri
|
|
|
6
6
|
import { ACCORDION_ITEM_CARD_LABELS_EN as x } from "./labels.js";
|
|
7
7
|
import { useId as S } from "react";
|
|
8
8
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
9
|
-
import { ArrowRight as E, ChevronDown as D, CircleAlert as O, ClipboardCheck as k, CreditCard as ee, Download as te, FileImage as ne, FileText as
|
|
9
|
+
import { ArrowRight as E, ChevronDown as D, CircleAlert as O, ClipboardCheck as k, CreditCard as ee, Download as te, FileImage as ne, FileText as re, Paperclip as A, Receipt as j, Send as M, Sparkles as ie, Trash2 as ae, TriangleAlert as oe, X as N, Zap as P } from "lucide-react";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js
|
|
11
|
-
var
|
|
12
|
-
receipt:
|
|
13
|
-
paperclip:
|
|
14
|
-
send:
|
|
15
|
-
},
|
|
16
|
-
function
|
|
11
|
+
var F = {
|
|
12
|
+
receipt: j,
|
|
13
|
+
paperclip: A,
|
|
14
|
+
send: M
|
|
15
|
+
}, I = "ttw:rounded-sm ttw:bg-muted ttw:p-1 ttw:text-sm ttw:text-muted-foreground", L = "ttw:rounded-sm ttw:bg-muted ttw:px-1.5 ttw:py-0.5 ttw:text-[10px] ttw:leading-none ttw:text-muted-foreground", R = "ttw:min-w-35 ttw:px-3 ttw:py-4";
|
|
16
|
+
function se() {
|
|
17
17
|
let e = `spent-from-card-${S().replace(/:/g, "")}`;
|
|
18
18
|
return /* @__PURE__ */ T("svg", {
|
|
19
19
|
width: "42",
|
|
@@ -52,7 +52,7 @@ function oe() {
|
|
|
52
52
|
]
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function z({ title: i, value: a, children: o }) {
|
|
56
56
|
return /* @__PURE__ */ w(e, {
|
|
57
57
|
type: "single",
|
|
58
58
|
collapsible: !0,
|
|
@@ -75,34 +75,34 @@ function B({ title: i, value: a, children: o }) {
|
|
|
75
75
|
})
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function B({ marker: e }) {
|
|
79
79
|
return /* @__PURE__ */ w("span", {
|
|
80
80
|
className: "ttw:inline-block ttw:-translate-y-0.5 ttw:text-sm ttw:font-normal ttw:text-destructive",
|
|
81
81
|
children: e
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function V({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder: s = !0, showPhysicalPill: p, receiptFileUrl: m, hasMissingInfo: h, showNoReceiptWarning: g, isReceiptRequired: _, isDescriptionRequired: S, isReceiptAutoMatched: E, isReceiptActionDisabled: k, receiptButtonLabel: N, receiptButtonIcon: P = "receipt", receiptButtonVariant: I = "outline", onUploadClick: V, onOpenReceiptInbox: H, onSubmitWithoutReceipt: U, onDeleteReceipt: W, descriptionValue: G, initialDescriptionValue: K, onDescriptionChange: ce, onSaveDescription: le, onCancelDescription: ue, isSavingDescription: q, isMemoEditable: J, memoBadgeLabel: Y, labels: de }) {
|
|
85
85
|
let X = {
|
|
86
86
|
...x,
|
|
87
87
|
...de
|
|
88
|
-
}, Z =
|
|
89
|
-
|
|
90
|
-
onSelect:
|
|
91
|
-
children: [/* @__PURE__ */ w(
|
|
88
|
+
}, Z = F[P], fe = m ? [] : [
|
|
89
|
+
V && /* @__PURE__ */ T(d, {
|
|
90
|
+
onSelect: V,
|
|
91
|
+
children: [/* @__PURE__ */ w(A, {
|
|
92
92
|
className: "ttw:size-4",
|
|
93
93
|
"aria-hidden": !0
|
|
94
94
|
}), X.uploadDropdownUploadOption]
|
|
95
95
|
}, "upload"),
|
|
96
|
-
|
|
97
|
-
onSelect:
|
|
96
|
+
H && /* @__PURE__ */ T(d, {
|
|
97
|
+
onSelect: H,
|
|
98
98
|
children: [/* @__PURE__ */ w(ne, {
|
|
99
99
|
className: "ttw:size-4",
|
|
100
100
|
"aria-hidden": !0
|
|
101
101
|
}), X.uploadDropdownFindReceiptOption]
|
|
102
102
|
}, "inbox"),
|
|
103
|
-
|
|
104
|
-
onSelect:
|
|
105
|
-
children: [/* @__PURE__ */ w(
|
|
103
|
+
U && /* @__PURE__ */ T(d, {
|
|
104
|
+
onSelect: U,
|
|
105
|
+
children: [/* @__PURE__ */ w(M, {
|
|
106
106
|
className: "ttw:size-4",
|
|
107
107
|
"aria-hidden": !0
|
|
108
108
|
}), X.uploadDropdownSubmitWithoutOption]
|
|
@@ -116,17 +116,17 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
116
116
|
rel: "noreferrer",
|
|
117
117
|
children: [/* @__PURE__ */ w(te, { "aria-hidden": !0 }), X.uploadedReceiptDownloadOption]
|
|
118
118
|
})
|
|
119
|
-
}, "download"),
|
|
119
|
+
}, "download"), W && /* @__PURE__ */ T(d, {
|
|
120
120
|
variant: "destructive",
|
|
121
|
-
onClick:
|
|
122
|
-
children: [/* @__PURE__ */ w(
|
|
121
|
+
onClick: W,
|
|
122
|
+
children: [/* @__PURE__ */ w(ae, { "aria-hidden": !0 }), X.uploadedReceiptDeleteOption]
|
|
123
123
|
}, "delete")] : [], Q = [...fe, ...pe].filter(Boolean), $ = E ? /* @__PURE__ */ T(c, {
|
|
124
124
|
type: "button",
|
|
125
125
|
variant: "ghost",
|
|
126
126
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-purple-700 ttw:hover:bg-purple-50",
|
|
127
127
|
disabled: k,
|
|
128
128
|
children: [
|
|
129
|
-
/* @__PURE__ */ w(
|
|
129
|
+
/* @__PURE__ */ w(j, {
|
|
130
130
|
className: "ttw:size-4",
|
|
131
131
|
"aria-hidden": !0
|
|
132
132
|
}),
|
|
@@ -138,7 +138,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
138
138
|
]
|
|
139
139
|
}) : /* @__PURE__ */ T(c, {
|
|
140
140
|
type: "button",
|
|
141
|
-
variant:
|
|
141
|
+
variant: I,
|
|
142
142
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
143
143
|
disabled: k,
|
|
144
144
|
children: [
|
|
@@ -146,20 +146,20 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
146
146
|
className: "ttw:size-4",
|
|
147
147
|
"aria-hidden": !0
|
|
148
148
|
}),
|
|
149
|
-
|
|
149
|
+
N,
|
|
150
150
|
Q.length > 0 && /* @__PURE__ */ w(D, {
|
|
151
151
|
className: "ttw:size-4",
|
|
152
152
|
"aria-hidden": !0
|
|
153
153
|
})
|
|
154
154
|
]
|
|
155
155
|
});
|
|
156
|
-
return /* @__PURE__ */ T(
|
|
156
|
+
return /* @__PURE__ */ T(z, {
|
|
157
157
|
title: e,
|
|
158
158
|
value: "requirements",
|
|
159
159
|
children: [
|
|
160
160
|
h && /* @__PURE__ */ T(i, {
|
|
161
161
|
className: "ttw:mb-4 ttw:flex ttw:border-amber-100 ttw:bg-amber-50 ttw:text-amber-700",
|
|
162
|
-
children: [/* @__PURE__ */ w(
|
|
162
|
+
children: [/* @__PURE__ */ w(oe, { "aria-hidden": !0 }), /* @__PURE__ */ w(o, {
|
|
163
163
|
className: "ttw:font-medium",
|
|
164
164
|
children: X.missingInfoWarning
|
|
165
165
|
})]
|
|
@@ -184,7 +184,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
184
184
|
/* @__PURE__ */ T("div", {
|
|
185
185
|
className: "ttw:flex",
|
|
186
186
|
children: [/* @__PURE__ */ w("div", {
|
|
187
|
-
className:
|
|
187
|
+
className: R,
|
|
188
188
|
children: /* @__PURE__ */ T(y, {
|
|
189
189
|
variant: "body2",
|
|
190
190
|
color: "muted",
|
|
@@ -200,7 +200,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
200
200
|
})
|
|
201
201
|
}), /* @__PURE__ */ w("div", {
|
|
202
202
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-3",
|
|
203
|
-
children: n ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
203
|
+
children: n ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(se, {}), /* @__PURE__ */ T("div", {
|
|
204
204
|
className: "ttw:flex ttw:flex-col",
|
|
205
205
|
children: [/* @__PURE__ */ w(y, {
|
|
206
206
|
variant: "body2",
|
|
@@ -214,7 +214,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
214
214
|
className: "ttw:leading-tight",
|
|
215
215
|
children: t
|
|
216
216
|
}), p && /* @__PURE__ */ w("span", {
|
|
217
|
-
className:
|
|
217
|
+
className: L,
|
|
218
218
|
children: X.physical
|
|
219
219
|
})]
|
|
220
220
|
})]
|
|
@@ -223,7 +223,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
223
223
|
className: "ttw:font-medium",
|
|
224
224
|
children: t
|
|
225
225
|
}), p && /* @__PURE__ */ w("span", {
|
|
226
|
-
className:
|
|
226
|
+
className: L,
|
|
227
227
|
children: X.physical
|
|
228
228
|
})] })
|
|
229
229
|
})]
|
|
@@ -231,7 +231,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
231
231
|
s && /* @__PURE__ */ T("div", {
|
|
232
232
|
className: "ttw:flex",
|
|
233
233
|
children: [/* @__PURE__ */ w("div", {
|
|
234
|
-
className:
|
|
234
|
+
className: R,
|
|
235
235
|
children: /* @__PURE__ */ w(y, {
|
|
236
236
|
variant: "body2",
|
|
237
237
|
color: "muted",
|
|
@@ -249,18 +249,18 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
249
249
|
/* @__PURE__ */ T("div", {
|
|
250
250
|
className: "ttw:flex",
|
|
251
251
|
children: [/* @__PURE__ */ w("div", {
|
|
252
|
-
className:
|
|
252
|
+
className: R,
|
|
253
253
|
children: /* @__PURE__ */ T(y, {
|
|
254
254
|
variant: "body2",
|
|
255
255
|
color: "muted",
|
|
256
256
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
257
257
|
children: [
|
|
258
|
-
/* @__PURE__ */ w(
|
|
258
|
+
/* @__PURE__ */ w(j, {
|
|
259
259
|
className: "ttw:size-4",
|
|
260
260
|
"aria-hidden": !0
|
|
261
261
|
}),
|
|
262
262
|
" ",
|
|
263
|
-
/* @__PURE__ */ T("span", { children: [X.receipt, _ && /* @__PURE__ */ w(
|
|
263
|
+
/* @__PURE__ */ T("span", { children: [X.receipt, _ && /* @__PURE__ */ w(B, { marker: X.requiredMarker })] })
|
|
264
264
|
]
|
|
265
265
|
})
|
|
266
266
|
}), /* @__PURE__ */ w("div", {
|
|
@@ -277,18 +277,18 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
277
277
|
/* @__PURE__ */ T("div", {
|
|
278
278
|
className: "ttw:flex",
|
|
279
279
|
children: [/* @__PURE__ */ T("div", {
|
|
280
|
-
className:
|
|
280
|
+
className: R,
|
|
281
281
|
children: [/* @__PURE__ */ T(y, {
|
|
282
282
|
variant: "body2",
|
|
283
283
|
color: Y ? void 0 : "muted",
|
|
284
284
|
className: b("ttw:flex ttw:items-center ttw:gap-2", Y && "ttw:text-purple-700"),
|
|
285
285
|
children: [
|
|
286
|
-
w(Y ?
|
|
286
|
+
w(Y ? ie : re, {
|
|
287
287
|
className: "ttw:size-4",
|
|
288
288
|
"aria-hidden": !0
|
|
289
289
|
}),
|
|
290
290
|
" ",
|
|
291
|
-
/* @__PURE__ */ T("span", { children: [X.memo, S && /* @__PURE__ */ w(
|
|
291
|
+
/* @__PURE__ */ T("span", { children: [X.memo, S && /* @__PURE__ */ w(B, { marker: X.requiredMarker })] })
|
|
292
292
|
]
|
|
293
293
|
}), Y && /* @__PURE__ */ w("span", {
|
|
294
294
|
className: "ttw:rounded-md ttw:bg-purple-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-purple-700",
|
|
@@ -299,21 +299,21 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
299
299
|
children: [/* @__PURE__ */ w(v, {
|
|
300
300
|
"aria-label": X.memo,
|
|
301
301
|
className: "ttw:max-h-24 ttw:min-h-24 ttw:resize-none",
|
|
302
|
-
value:
|
|
303
|
-
onChange:
|
|
304
|
-
disabled: !
|
|
305
|
-
}),
|
|
302
|
+
value: G,
|
|
303
|
+
onChange: ce,
|
|
304
|
+
disabled: !J
|
|
305
|
+
}), G !== K && /* @__PURE__ */ T("div", {
|
|
306
306
|
className: "ttw:flex ttw:gap-2",
|
|
307
307
|
children: [/* @__PURE__ */ w(c, {
|
|
308
308
|
type: "button",
|
|
309
309
|
variant: "ghost",
|
|
310
|
-
disabled:
|
|
311
|
-
onClick:
|
|
310
|
+
disabled: q,
|
|
311
|
+
onClick: ue,
|
|
312
312
|
children: X.cancelButton
|
|
313
313
|
}), /* @__PURE__ */ w(c, {
|
|
314
314
|
type: "button",
|
|
315
|
-
onClick:
|
|
316
|
-
disabled: J,
|
|
315
|
+
onClick: le,
|
|
316
|
+
disabled: q || !J,
|
|
317
317
|
children: X.saveButton
|
|
318
318
|
})]
|
|
319
319
|
})]
|
|
@@ -322,18 +322,18 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
322
322
|
]
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function H({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasAppliedPolicy: o, isRejected: s, isAutoApproved: c, isManuallyApproved: l, isPendingReview: u, rejectionReason: d, approverName: f, labels: p }) {
|
|
326
326
|
let m = {
|
|
327
327
|
...x,
|
|
328
328
|
...p
|
|
329
329
|
};
|
|
330
|
-
return /* @__PURE__ */ T(
|
|
330
|
+
return /* @__PURE__ */ T(z, {
|
|
331
331
|
title: e,
|
|
332
332
|
value: "approvals",
|
|
333
333
|
children: [
|
|
334
334
|
s && /* @__PURE__ */ T(i, {
|
|
335
335
|
className: "ttw:mb-4 ttw:flex ttw:border-pink-200 ttw:bg-pink-50 ttw:text-pink-700",
|
|
336
|
-
children: [/* @__PURE__ */ w(
|
|
336
|
+
children: [/* @__PURE__ */ w(N, { "aria-hidden": !0 }), /* @__PURE__ */ w(a, {
|
|
337
337
|
className: "ttw:text-pink-700",
|
|
338
338
|
children: d ? `"${d}"` : m.emptyRejectionReason
|
|
339
339
|
})]
|
|
@@ -341,7 +341,7 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
341
341
|
/* @__PURE__ */ T("div", {
|
|
342
342
|
className: "ttw:flex",
|
|
343
343
|
children: [/* @__PURE__ */ w("div", {
|
|
344
|
-
className:
|
|
344
|
+
className: R,
|
|
345
345
|
children: /* @__PURE__ */ T(y, {
|
|
346
346
|
variant: "body2",
|
|
347
347
|
color: "muted",
|
|
@@ -358,7 +358,7 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
358
358
|
}), /* @__PURE__ */ w("div", {
|
|
359
359
|
className: "ttw:flex ttw:items-center ttw:gap-0.5 ttw:px-3",
|
|
360
360
|
children: r ? /* @__PURE__ */ w("span", {
|
|
361
|
-
className:
|
|
361
|
+
className: I,
|
|
362
362
|
children: r
|
|
363
363
|
}) : o ? /* @__PURE__ */ T(C, { children: [
|
|
364
364
|
!!t && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, {
|
|
@@ -366,7 +366,7 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
366
366
|
className: "ttw:font-medium",
|
|
367
367
|
children: m.greaterThan
|
|
368
368
|
}), /* @__PURE__ */ w("span", {
|
|
369
|
-
className:
|
|
369
|
+
className: I,
|
|
370
370
|
children: t
|
|
371
371
|
})] }),
|
|
372
372
|
!!(t && n) && /* @__PURE__ */ w(E, {
|
|
@@ -378,11 +378,11 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
378
378
|
className: "ttw:font-medium",
|
|
379
379
|
children: m.lessThan
|
|
380
380
|
}), /* @__PURE__ */ w("span", {
|
|
381
|
-
className:
|
|
381
|
+
className: I,
|
|
382
382
|
children: n
|
|
383
383
|
})] })
|
|
384
384
|
] }) : /* @__PURE__ */ w("span", {
|
|
385
|
-
className:
|
|
385
|
+
className: I,
|
|
386
386
|
children: m.systemDefaultApplied
|
|
387
387
|
})
|
|
388
388
|
})]
|
|
@@ -390,13 +390,13 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
390
390
|
/* @__PURE__ */ T("div", {
|
|
391
391
|
className: "ttw:flex",
|
|
392
392
|
children: [/* @__PURE__ */ w("div", {
|
|
393
|
-
className:
|
|
393
|
+
className: R,
|
|
394
394
|
children: /* @__PURE__ */ T(y, {
|
|
395
395
|
variant: "body2",
|
|
396
396
|
color: "muted",
|
|
397
397
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
398
398
|
children: [
|
|
399
|
-
/* @__PURE__ */ w(
|
|
399
|
+
/* @__PURE__ */ w(P, {
|
|
400
400
|
className: "ttw:size-4",
|
|
401
401
|
"aria-hidden": !0
|
|
402
402
|
}),
|
|
@@ -429,7 +429,7 @@ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasA
|
|
|
429
429
|
]
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function U({ title: i, rows: a, isLoading: o, isError: c, historyLabels: l }) {
|
|
433
433
|
return /* @__PURE__ */ w(e, {
|
|
434
434
|
type: "single",
|
|
435
435
|
collapsible: !0,
|
|
@@ -457,17 +457,17 @@ function W({ title: i, rows: a, isLoading: o, isError: c, historyLabels: l }) {
|
|
|
457
457
|
})
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function W({ label: e, highlighted: t, value: n, options: r, onChange: i, disabled: a }) {
|
|
461
461
|
return /* @__PURE__ */ T("div", {
|
|
462
462
|
className: "ttw:flex ttw:items-center",
|
|
463
463
|
children: [/* @__PURE__ */ w("div", {
|
|
464
|
-
className:
|
|
464
|
+
className: R,
|
|
465
465
|
children: /* @__PURE__ */ T(y, {
|
|
466
466
|
variant: "body2",
|
|
467
467
|
color: t ? void 0 : "muted",
|
|
468
468
|
className: b("ttw:flex ttw:items-center ttw:gap-2 ttw:font-medium", t && "ttw:text-purple-700"),
|
|
469
469
|
children: [
|
|
470
|
-
/* @__PURE__ */ w(
|
|
470
|
+
/* @__PURE__ */ w(P, {
|
|
471
471
|
className: "ttw:size-4",
|
|
472
472
|
"aria-hidden": !0
|
|
473
473
|
}),
|
|
@@ -493,57 +493,59 @@ function G({ label: e, highlighted: t, value: n, options: r, onChange: i, disabl
|
|
|
493
493
|
})]
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
|
-
function
|
|
497
|
-
let
|
|
496
|
+
function G({ title: e, glCategory: t, initialGlCategory: n, glCategoryOptions: r, onGlCategoryChange: i, department: a, initialDepartment: o, departmentOptions: s, onDepartmentChange: l, location: u, initialLocation: d, locationOptions: f, onLocationChange: p, onSave: m, onCancel: h, isSaving: g, isGlCategoryDisabled: _, isDisabled: v, glCategoryHighlight: y, departmentHighlight: b, locationHighlight: S, labels: C }) {
|
|
497
|
+
let E = {
|
|
498
498
|
...x,
|
|
499
|
-
...
|
|
500
|
-
},
|
|
501
|
-
return /* @__PURE__ */ T(
|
|
499
|
+
...C
|
|
500
|
+
}, D = t !== n || a !== o || u !== d;
|
|
501
|
+
return /* @__PURE__ */ T(z, {
|
|
502
502
|
title: e,
|
|
503
503
|
value: "accounting",
|
|
504
504
|
children: [
|
|
505
|
-
/* @__PURE__ */ w(
|
|
506
|
-
label:
|
|
507
|
-
highlighted:
|
|
505
|
+
/* @__PURE__ */ w(W, {
|
|
506
|
+
label: E.glCategory,
|
|
507
|
+
highlighted: y,
|
|
508
508
|
value: t,
|
|
509
509
|
options: r,
|
|
510
510
|
onChange: i,
|
|
511
|
-
disabled: _
|
|
511
|
+
disabled: _ || v
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */ w(
|
|
514
|
-
label:
|
|
515
|
-
highlighted:
|
|
513
|
+
/* @__PURE__ */ w(W, {
|
|
514
|
+
label: E.department,
|
|
515
|
+
highlighted: b,
|
|
516
516
|
value: a,
|
|
517
517
|
options: s,
|
|
518
|
-
onChange: l
|
|
518
|
+
onChange: l,
|
|
519
|
+
disabled: v
|
|
519
520
|
}),
|
|
520
|
-
/* @__PURE__ */ w(
|
|
521
|
-
label:
|
|
522
|
-
highlighted:
|
|
521
|
+
/* @__PURE__ */ w(W, {
|
|
522
|
+
label: E.location,
|
|
523
|
+
highlighted: S,
|
|
523
524
|
value: u,
|
|
524
525
|
options: f,
|
|
525
|
-
onChange: p
|
|
526
|
+
onChange: p,
|
|
527
|
+
disabled: v
|
|
526
528
|
}),
|
|
527
|
-
|
|
529
|
+
D && /* @__PURE__ */ T("div", {
|
|
528
530
|
className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:px-3",
|
|
529
531
|
children: [/* @__PURE__ */ w(c, {
|
|
530
532
|
type: "button",
|
|
531
533
|
variant: "ghost",
|
|
532
534
|
disabled: g,
|
|
533
535
|
onClick: h,
|
|
534
|
-
children:
|
|
536
|
+
children: E.cancelButton
|
|
535
537
|
}), /* @__PURE__ */ w(c, {
|
|
536
538
|
type: "button",
|
|
537
|
-
disabled: g,
|
|
539
|
+
disabled: g || v,
|
|
538
540
|
onClick: m,
|
|
539
|
-
children:
|
|
541
|
+
children: E.saveButton
|
|
540
542
|
})]
|
|
541
543
|
})
|
|
542
544
|
]
|
|
543
545
|
});
|
|
544
546
|
}
|
|
545
|
-
function
|
|
546
|
-
return e.type === "auditHistory" ? /* @__PURE__ */ w(
|
|
547
|
+
function K(e) {
|
|
548
|
+
return e.type === "auditHistory" ? /* @__PURE__ */ w(U, { ...e }) : e.type === "approvals" ? /* @__PURE__ */ w(H, { ...e }) : e.type === "accounting" ? /* @__PURE__ */ w(G, { ...e }) : /* @__PURE__ */ w(V, { ...e });
|
|
547
549
|
}
|
|
548
550
|
//#endregion
|
|
549
|
-
export {
|
|
551
|
+
export { K as AccordionItemCard, K as default };
|