@wealthx/shadcn 1.5.18 → 1.5.20
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/.turbo/turbo-build.log +148 -148
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-PUGQVHQL.mjs → chunk-2SDEURIQ.mjs} +2 -2
- package/dist/{chunk-STDCXTUU.mjs → chunk-3S4XQTAL.mjs} +2 -2
- package/dist/{chunk-ANERULZS.mjs → chunk-4UCRTTVL.mjs} +1 -1
- package/dist/{chunk-6LWCFAB4.mjs → chunk-57QES5LX.mjs} +1 -1
- package/dist/{chunk-KICT4VQL.mjs → chunk-5G2M45CA.mjs} +1 -1
- package/dist/{chunk-K3XP5ETH.mjs → chunk-66NM4AX2.mjs} +2 -2
- package/dist/{chunk-LWYMZHN7.mjs → chunk-6HTE24TP.mjs} +3 -3
- package/dist/{chunk-SSUK6C2K.mjs → chunk-6WRDXE7A.mjs} +1 -1
- package/dist/{chunk-RPOIXMHW.mjs → chunk-AADJ5IT6.mjs} +1 -1
- package/dist/{chunk-DKH35J4U.mjs → chunk-BWG7AX6X.mjs} +2 -2
- package/dist/{chunk-UBHBIWIA.mjs → chunk-DK55HZPN.mjs} +2 -2
- package/dist/{chunk-2UA4CPE5.mjs → chunk-DWJHPNFL.mjs} +1 -1
- package/dist/{chunk-ZAXZBOWI.mjs → chunk-EHQ35FYA.mjs} +4 -1
- package/dist/{chunk-WZFBLRNP.mjs → chunk-ETT5JAXF.mjs} +2 -2
- package/dist/{chunk-L7IZ3YHI.mjs → chunk-F3MIRXRF.mjs} +2 -2
- package/dist/{chunk-G7YCLJ53.mjs → chunk-G6RCC2SF.mjs} +2 -2
- package/dist/{chunk-NCMV3LTP.mjs → chunk-H3PTREG6.mjs} +4 -1
- package/dist/{chunk-7II6QRCZ.mjs → chunk-H5NI6ZIU.mjs} +1 -1
- package/dist/{chunk-TUC2BNUR.mjs → chunk-IG7JBQZO.mjs} +2 -2
- package/dist/{chunk-GAXNO4JB.mjs → chunk-INGYBZGU.mjs} +1 -1
- package/dist/{chunk-UXWNUMQA.mjs → chunk-IT3QJF3D.mjs} +1 -1
- package/dist/{chunk-45V7X563.mjs → chunk-JGUC3KCA.mjs} +2 -2
- package/dist/{chunk-C4ESZLGT.mjs → chunk-K4GJTP6N.mjs} +1 -1
- package/dist/{chunk-USOVLDGS.mjs → chunk-K6VCC2MK.mjs} +13 -1
- package/dist/{chunk-5BU7TNB4.mjs → chunk-NEMWMXGL.mjs} +2 -2
- package/dist/{chunk-B3CTBLIY.mjs → chunk-NTIFG5A7.mjs} +2 -2
- package/dist/{chunk-33VT74R4.mjs → chunk-OFQFD2E2.mjs} +1 -1
- package/dist/{chunk-LI2CTS5O.mjs → chunk-OIETBBXQ.mjs} +4 -2
- package/dist/{chunk-TLLD5IU6.mjs → chunk-PSBQ4I3M.mjs} +1 -1
- package/dist/{chunk-XNX3XJ2F.mjs → chunk-QJ3RSZF4.mjs} +1 -1
- package/dist/{chunk-3NJPNSJG.mjs → chunk-RGHKARAK.mjs} +1 -1
- package/dist/{chunk-RFWP2325.mjs → chunk-RJHE3V4M.mjs} +1 -1
- package/dist/{chunk-SH5L5VG6.mjs → chunk-RVDBYV2B.mjs} +1 -1
- package/dist/{chunk-SU6TPDEU.mjs → chunk-SET6GFGL.mjs} +1 -1
- package/dist/{chunk-JJSA772M.mjs → chunk-WIDZVCH3.mjs} +1 -1
- package/dist/components/ui/add-column-modal.js +4 -2
- package/dist/components/ui/add-column-modal.mjs +2 -2
- package/dist/components/ui/add-lead-modal.js +13 -6
- package/dist/components/ui/add-lead-modal.mjs +4 -4
- package/dist/components/ui/ai-assistant-drawer.mjs +2 -2
- package/dist/components/ui/ai-builder.js +4 -2
- package/dist/components/ui/ai-builder.mjs +2 -2
- package/dist/components/ui/ai-conversations.js +4 -2
- package/dist/components/ui/ai-conversations.mjs +2 -2
- package/dist/components/ui/appointment-action-dialogs.js +4 -2
- package/dist/components/ui/appointment-action-dialogs.mjs +2 -2
- package/dist/components/ui/appointment-availability-settings.js +10 -3
- package/dist/components/ui/appointment-availability-settings.mjs +3 -3
- package/dist/components/ui/appointment-book-dialog.js +10 -3
- package/dist/components/ui/appointment-book-dialog.mjs +3 -3
- package/dist/components/ui/appointment-detail-sheet.js +4 -2
- package/dist/components/ui/appointment-detail-sheet.mjs +4 -4
- package/dist/components/ui/appointment-upcoming-card.js +4 -2
- package/dist/components/ui/appointment-upcoming-card.mjs +2 -2
- package/dist/components/ui/backoffice-signup-steps.js +6 -1
- package/dist/components/ui/backoffice-signup-steps.mjs +3 -3
- package/dist/components/ui/bank-statement-generate-dialog.js +13 -6
- package/dist/components/ui/bank-statement-generate-dialog.mjs +4 -4
- package/dist/components/ui/bank-statement-pdf-viewer.js +4 -2
- package/dist/components/ui/bank-statement-pdf-viewer.mjs +2 -2
- package/dist/components/ui/category-edit-dialog.js +4 -2
- package/dist/components/ui/category-edit-dialog.mjs +2 -2
- package/dist/components/ui/contact-alert-dialog/index.js +22 -15
- package/dist/components/ui/contact-alert-dialog/index.mjs +3 -3
- package/dist/components/ui/create-contact-modal.js +25 -18
- package/dist/components/ui/create-contact-modal.mjs +3 -3
- package/dist/components/ui/csv-import-modal.js +4 -2
- package/dist/components/ui/csv-import-modal.mjs +2 -2
- package/dist/components/ui/dashboard-transactions-table.js +4 -2
- package/dist/components/ui/dashboard-transactions-table.mjs +2 -2
- package/dist/components/ui/data-table.js +13 -8
- package/dist/components/ui/data-table.mjs +3 -3
- package/dist/components/ui/dialog.js +4 -2
- package/dist/components/ui/dialog.mjs +1 -1
- package/dist/components/ui/document-checklist-template.js +6 -1
- package/dist/components/ui/document-checklist-template.mjs +2 -2
- package/dist/components/ui/drawer.js +4 -1
- package/dist/components/ui/drawer.mjs +1 -1
- package/dist/components/ui/file-preview-dialog.js +13 -6
- package/dist/components/ui/file-preview-dialog.mjs +3 -3
- package/dist/components/ui/financial-drawers.mjs +2 -2
- package/dist/components/ui/frontend-signup-steps.js +4 -0
- package/dist/components/ui/frontend-signup-steps.mjs +3 -3
- package/dist/components/ui/opportunity-edit-modals.js +54 -47
- package/dist/components/ui/opportunity-edit-modals.mjs +3 -3
- package/dist/components/ui/opportunity-summary-tab.js +59 -52
- package/dist/components/ui/opportunity-summary-tab.mjs +4 -4
- package/dist/components/ui/pagination.js +6 -1
- package/dist/components/ui/pagination.mjs +2 -2
- package/dist/components/ui/pipeline-dialogs.js +24 -17
- package/dist/components/ui/pipeline-dialogs.mjs +3 -3
- package/dist/components/ui/property-report-dialog.js +4 -2
- package/dist/components/ui/property-report-dialog.mjs +2 -2
- package/dist/components/ui/resource-center/index.js +4 -2
- package/dist/components/ui/resource-center/index.mjs +2 -2
- package/dist/components/ui/review-alerts-dialog.js +4 -2
- package/dist/components/ui/review-alerts-dialog.mjs +2 -2
- package/dist/components/ui/savings-goal-modal.js +4 -2
- package/dist/components/ui/savings-goal-modal.mjs +1 -1
- package/dist/components/ui/scenario-drawer.mjs +1 -1
- package/dist/components/ui/select.js +24 -1
- package/dist/components/ui/select.mjs +3 -1
- package/dist/components/ui/share-details-dialog.js +4 -2
- package/dist/components/ui/share-details-dialog.mjs +2 -2
- package/dist/components/ui/sheet.js +4 -1
- package/dist/components/ui/sheet.mjs +1 -1
- package/dist/components/ui/signup-form-primitives.js +6 -1
- package/dist/components/ui/signup-form-primitives.mjs +2 -2
- package/dist/index.js +168 -147
- package/dist/index.mjs +36 -34
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/index.tsx +2 -0
- package/src/components/ui/dialog.tsx +4 -2
- package/src/components/ui/drawer.tsx +4 -1
- package/src/components/ui/select.tsx +34 -1
- package/src/components/ui/sheet.tsx +4 -1
- package/src/styles/globals.css +6 -0
- package/src/styles/styles-css.ts +1 -1
|
@@ -796,6 +796,7 @@ function FieldLabel(_a) {
|
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
// src/components/ui/select.tsx
|
|
799
|
+
var React7 = __toESM(require("react"));
|
|
799
800
|
var import_lucide_react5 = require("lucide-react");
|
|
800
801
|
var import_select = require("@base-ui/react/select");
|
|
801
802
|
|
|
@@ -806,6 +807,9 @@ var ThemeVarsContext = (0, import_react3.createContext)({});
|
|
|
806
807
|
|
|
807
808
|
// src/components/ui/select.tsx
|
|
808
809
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
810
|
+
var SelectPortalContext = React7.createContext(
|
|
811
|
+
void 0
|
|
812
|
+
);
|
|
809
813
|
|
|
810
814
|
// src/components/ui/password-strength-tooltip.tsx
|
|
811
815
|
var import_lucide_react6 = require("lucide-react");
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
FrontendSuccessStep,
|
|
7
7
|
PhoneVerifyStep,
|
|
8
8
|
RetrieveBankDataStep
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-4UCRTTVL.mjs";
|
|
10
10
|
import "../../chunk-HK4HUQTV.mjs";
|
|
11
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-DWJHPNFL.mjs";
|
|
12
12
|
import "../../chunk-WHIW6KOB.mjs";
|
|
13
13
|
import "../../chunk-KPGARKFC.mjs";
|
|
14
14
|
import "../../chunk-ET4MTPIY.mjs";
|
|
15
15
|
import "../../chunk-ISUA7DSB.mjs";
|
|
16
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-K6VCC2MK.mjs";
|
|
17
17
|
import "../../chunk-JVMXMFBB.mjs";
|
|
18
18
|
import "../../chunk-2GIYVERS.mjs";
|
|
19
19
|
import "../../chunk-LSRGA5BI.mjs";
|
|
@@ -67,7 +67,7 @@ __export(opportunity_edit_modals_exports, {
|
|
|
67
67
|
EditLoanScenarioModal: () => EditLoanScenarioModal
|
|
68
68
|
});
|
|
69
69
|
module.exports = __toCommonJS(opportunity_edit_modals_exports);
|
|
70
|
-
var
|
|
70
|
+
var React9 = __toESM(require("react"));
|
|
71
71
|
var import_lucide_react10 = require("lucide-react");
|
|
72
72
|
|
|
73
73
|
// src/lib/utils.ts
|
|
@@ -277,7 +277,7 @@ function DialogOverlay(_a) {
|
|
|
277
277
|
__spreadValues({
|
|
278
278
|
className: cn(
|
|
279
279
|
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
280
|
-
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
280
|
+
"fixed inset-0 z-50 bg-foreground/50 pointer-events-auto data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
281
281
|
className
|
|
282
282
|
),
|
|
283
283
|
"data-slot": "dialog-overlay"
|
|
@@ -328,7 +328,9 @@ function DialogContent(_a) {
|
|
|
328
328
|
// max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
|
|
329
329
|
// Fixed max-width is applied via inline style (sizeStyle) to avoid
|
|
330
330
|
// Tailwind v4 class-scanning gaps with dynamic class lookups.
|
|
331
|
-
|
|
331
|
+
// pointer-events-auto: Vaul Drawer (Radix DismissableLayer) sets body{pointer-events:none}
|
|
332
|
+
// when open — dialog portals to body and must override that on its own element.
|
|
333
|
+
"fixed left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] gap-4 border bg-background p-6 duration-200 outline-none pointer-events-auto data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
332
334
|
// "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
|
|
333
335
|
isAuto ? "w-auto" : "w-full",
|
|
334
336
|
align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
|
|
@@ -483,9 +485,13 @@ function Textarea(_a) {
|
|
|
483
485
|
}
|
|
484
486
|
|
|
485
487
|
// src/components/ui/select.tsx
|
|
488
|
+
var React3 = __toESM(require("react"));
|
|
486
489
|
var import_lucide_react3 = require("lucide-react");
|
|
487
490
|
var import_select = require("@base-ui/react/select");
|
|
488
491
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
492
|
+
var SelectPortalContext = React3.createContext(
|
|
493
|
+
void 0
|
|
494
|
+
);
|
|
489
495
|
function Select(_a) {
|
|
490
496
|
var props = __objRest(_a, []);
|
|
491
497
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_select.Select.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
@@ -532,7 +538,8 @@ function SelectContent(_a) {
|
|
|
532
538
|
"style"
|
|
533
539
|
]);
|
|
534
540
|
const themeVars = useThemeVars();
|
|
535
|
-
|
|
541
|
+
const portalContainer = React3.useContext(SelectPortalContext);
|
|
542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_select.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
536
543
|
import_select.Select.Positioner,
|
|
537
544
|
{
|
|
538
545
|
className: "z-[200]",
|
|
@@ -711,12 +718,12 @@ function Checkbox(_a) {
|
|
|
711
718
|
}
|
|
712
719
|
|
|
713
720
|
// src/components/ui/date-picker.tsx
|
|
714
|
-
var
|
|
721
|
+
var React5 = __toESM(require("react"));
|
|
715
722
|
var import_date_fns2 = require("date-fns");
|
|
716
723
|
var import_lucide_react7 = require("lucide-react");
|
|
717
724
|
|
|
718
725
|
// src/components/ui/calendar.tsx
|
|
719
|
-
var
|
|
726
|
+
var React4 = __toESM(require("react"));
|
|
720
727
|
var import_lucide_react6 = require("lucide-react");
|
|
721
728
|
var import_react_day_picker = require("react-day-picker");
|
|
722
729
|
|
|
@@ -905,8 +912,8 @@ function CalendarDayButton(_a) {
|
|
|
905
912
|
"modifiers"
|
|
906
913
|
]);
|
|
907
914
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
908
|
-
const ref =
|
|
909
|
-
|
|
915
|
+
const ref = React4.useRef(null);
|
|
916
|
+
React4.useEffect(() => {
|
|
910
917
|
var _a2;
|
|
911
918
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
912
919
|
}, [modifiers.focused]);
|
|
@@ -987,7 +994,7 @@ function DatePicker({
|
|
|
987
994
|
className,
|
|
988
995
|
calendarProps
|
|
989
996
|
}) {
|
|
990
|
-
const [open, setOpen] =
|
|
997
|
+
const [open, setOpen] = React5.useState(false);
|
|
991
998
|
function handleDaySelect(day) {
|
|
992
999
|
if (!day) {
|
|
993
1000
|
onChange == null ? void 0 : onChange(void 0);
|
|
@@ -1076,10 +1083,10 @@ function DatePicker({
|
|
|
1076
1083
|
}
|
|
1077
1084
|
|
|
1078
1085
|
// src/components/ui/slider.tsx
|
|
1079
|
-
var
|
|
1086
|
+
var React6 = __toESM(require("react"));
|
|
1080
1087
|
var import_slider = require("@base-ui/react/slider");
|
|
1081
1088
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1082
|
-
var Slider =
|
|
1089
|
+
var Slider = React6.forwardRef(
|
|
1083
1090
|
({
|
|
1084
1091
|
className,
|
|
1085
1092
|
value,
|
|
@@ -1202,11 +1209,11 @@ function RadioGroupItem(_a) {
|
|
|
1202
1209
|
}
|
|
1203
1210
|
|
|
1204
1211
|
// src/components/ui/form-primitives.tsx
|
|
1205
|
-
var
|
|
1212
|
+
var React8 = __toESM(require("react"));
|
|
1206
1213
|
var import_lucide_react9 = require("lucide-react");
|
|
1207
1214
|
|
|
1208
1215
|
// src/components/ui/toggle-group.tsx
|
|
1209
|
-
var
|
|
1216
|
+
var React7 = __toESM(require("react"));
|
|
1210
1217
|
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
1211
1218
|
var import_toggle2 = require("@base-ui/react/toggle");
|
|
1212
1219
|
|
|
@@ -1237,7 +1244,7 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
|
1237
1244
|
|
|
1238
1245
|
// src/components/ui/toggle-group.tsx
|
|
1239
1246
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1240
|
-
var ToggleGroupContext =
|
|
1247
|
+
var ToggleGroupContext = React7.createContext({
|
|
1241
1248
|
size: "default",
|
|
1242
1249
|
variant: "default",
|
|
1243
1250
|
spacing: 0
|
|
@@ -1289,7 +1296,7 @@ function ToggleGroupItem(_a) {
|
|
|
1289
1296
|
"variant",
|
|
1290
1297
|
"size"
|
|
1291
1298
|
]);
|
|
1292
|
-
const context =
|
|
1299
|
+
const context = React7.useContext(ToggleGroupContext);
|
|
1293
1300
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1294
1301
|
import_toggle2.Toggle,
|
|
1295
1302
|
__spreadProps(__spreadValues({
|
|
@@ -1333,13 +1340,13 @@ function CurrencyInputWithSlider({
|
|
|
1333
1340
|
onValueChange,
|
|
1334
1341
|
className
|
|
1335
1342
|
}) {
|
|
1336
|
-
const [internalValue, setInternalValue] =
|
|
1343
|
+
const [internalValue, setInternalValue] = React8.useState(defaultValue);
|
|
1337
1344
|
const numericValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
1338
|
-
const [inputText, setInputText] =
|
|
1345
|
+
const [inputText, setInputText] = React8.useState(
|
|
1339
1346
|
formatNumberToCurrency(numericValue)
|
|
1340
1347
|
);
|
|
1341
|
-
const [isFocused, setIsFocused] =
|
|
1342
|
-
|
|
1348
|
+
const [isFocused, setIsFocused] = React8.useState(false);
|
|
1349
|
+
React8.useEffect(() => {
|
|
1343
1350
|
if (!isFocused) {
|
|
1344
1351
|
setInputText(formatNumberToCurrency(numericValue));
|
|
1345
1352
|
}
|
|
@@ -1437,13 +1444,13 @@ function AddressAutocomplete({
|
|
|
1437
1444
|
onSelect,
|
|
1438
1445
|
className
|
|
1439
1446
|
}) {
|
|
1440
|
-
const [internalValue, setInternalValue] =
|
|
1447
|
+
const [internalValue, setInternalValue] = React8.useState("");
|
|
1441
1448
|
const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
1442
|
-
const [open, setOpen] =
|
|
1443
|
-
const [activeIndex, setActiveIndex] =
|
|
1444
|
-
const containerRef =
|
|
1445
|
-
const listRef =
|
|
1446
|
-
const filtered =
|
|
1449
|
+
const [open, setOpen] = React8.useState(false);
|
|
1450
|
+
const [activeIndex, setActiveIndex] = React8.useState(-1);
|
|
1451
|
+
const containerRef = React8.useRef(null);
|
|
1452
|
+
const listRef = React8.useRef(null);
|
|
1453
|
+
const filtered = React8.useMemo(() => {
|
|
1447
1454
|
if (!inputValue.trim()) return suggestions.slice(0, 5);
|
|
1448
1455
|
const q = inputValue.toLowerCase();
|
|
1449
1456
|
return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
|
|
@@ -1473,7 +1480,7 @@ function AddressAutocomplete({
|
|
|
1473
1480
|
setOpen(false);
|
|
1474
1481
|
}
|
|
1475
1482
|
};
|
|
1476
|
-
|
|
1483
|
+
React8.useEffect(() => {
|
|
1477
1484
|
const handler = (e) => {
|
|
1478
1485
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
1479
1486
|
setOpen(false);
|
|
@@ -1550,7 +1557,7 @@ function OwnershipSplit({
|
|
|
1550
1557
|
onOwnersChange,
|
|
1551
1558
|
className
|
|
1552
1559
|
}) {
|
|
1553
|
-
const [internalOwners, setInternalOwners] =
|
|
1560
|
+
const [internalOwners, setInternalOwners] = React8.useState(DEFAULT_OWNERS);
|
|
1554
1561
|
const owners = controlledOwners !== void 0 ? controlledOwners : internalOwners;
|
|
1555
1562
|
const setOwners = (updated) => {
|
|
1556
1563
|
if (controlledOwners === void 0) setInternalOwners(updated);
|
|
@@ -1955,9 +1962,9 @@ function EditLoanScenarioModal({
|
|
|
1955
1962
|
container,
|
|
1956
1963
|
className
|
|
1957
1964
|
}) {
|
|
1958
|
-
const [form, setForm] =
|
|
1959
|
-
const initialSnapshot =
|
|
1960
|
-
|
|
1965
|
+
const [form, setForm] = React9.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
|
|
1966
|
+
const initialSnapshot = React9.useRef("");
|
|
1967
|
+
React9.useEffect(() => {
|
|
1961
1968
|
if (open) {
|
|
1962
1969
|
const data = __spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData);
|
|
1963
1970
|
setForm(data);
|
|
@@ -2217,11 +2224,11 @@ function EditAssetsModal({
|
|
|
2217
2224
|
container,
|
|
2218
2225
|
className
|
|
2219
2226
|
}) {
|
|
2220
|
-
const [items, setItems] =
|
|
2227
|
+
const [items, setItems] = React9.useState(
|
|
2221
2228
|
initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()]
|
|
2222
2229
|
);
|
|
2223
|
-
const initialSnapshot =
|
|
2224
|
-
|
|
2230
|
+
const initialSnapshot = React9.useRef("");
|
|
2231
|
+
React9.useEffect(() => {
|
|
2225
2232
|
if (open) {
|
|
2226
2233
|
const data = initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()];
|
|
2227
2234
|
setItems(data);
|
|
@@ -2514,11 +2521,11 @@ function EditDebtsModal({
|
|
|
2514
2521
|
container,
|
|
2515
2522
|
className
|
|
2516
2523
|
}) {
|
|
2517
|
-
const [items, setItems] =
|
|
2524
|
+
const [items, setItems] = React9.useState(
|
|
2518
2525
|
initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()]
|
|
2519
2526
|
);
|
|
2520
|
-
const initialSnapshot =
|
|
2521
|
-
|
|
2527
|
+
const initialSnapshot = React9.useRef("");
|
|
2528
|
+
React9.useEffect(() => {
|
|
2522
2529
|
if (open) {
|
|
2523
2530
|
const data = initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()];
|
|
2524
2531
|
setItems(data);
|
|
@@ -2840,9 +2847,9 @@ function EditAboutApplicantModal({
|
|
|
2840
2847
|
container,
|
|
2841
2848
|
className
|
|
2842
2849
|
}) {
|
|
2843
|
-
const [form, setForm] =
|
|
2844
|
-
const initialSnapshot =
|
|
2845
|
-
|
|
2850
|
+
const [form, setForm] = React9.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
|
|
2851
|
+
const initialSnapshot = React9.useRef("");
|
|
2852
|
+
React9.useEffect(() => {
|
|
2846
2853
|
if (open) {
|
|
2847
2854
|
const data = __spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData);
|
|
2848
2855
|
setForm(data);
|
|
@@ -3114,7 +3121,7 @@ function EditIncomeModal({
|
|
|
3114
3121
|
container,
|
|
3115
3122
|
className
|
|
3116
3123
|
}) {
|
|
3117
|
-
const defaultItems =
|
|
3124
|
+
const defaultItems = React9.useMemo(
|
|
3118
3125
|
() => {
|
|
3119
3126
|
var _a;
|
|
3120
3127
|
return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
|
|
@@ -3122,9 +3129,9 @@ function EditIncomeModal({
|
|
|
3122
3129
|
[]
|
|
3123
3130
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
3124
3131
|
);
|
|
3125
|
-
const [items, setItems] =
|
|
3126
|
-
const initialSnapshot =
|
|
3127
|
-
|
|
3132
|
+
const [items, setItems] = React9.useState(defaultItems);
|
|
3133
|
+
const initialSnapshot = React9.useRef("");
|
|
3134
|
+
React9.useEffect(() => {
|
|
3128
3135
|
var _a;
|
|
3129
3136
|
if (open) {
|
|
3130
3137
|
const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
|
|
@@ -3341,7 +3348,7 @@ function EditExpensesModal({
|
|
|
3341
3348
|
container,
|
|
3342
3349
|
className
|
|
3343
3350
|
}) {
|
|
3344
|
-
const defaultItems =
|
|
3351
|
+
const defaultItems = React9.useMemo(
|
|
3345
3352
|
() => {
|
|
3346
3353
|
var _a;
|
|
3347
3354
|
return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
|
|
@@ -3349,9 +3356,9 @@ function EditExpensesModal({
|
|
|
3349
3356
|
[]
|
|
3350
3357
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
3351
3358
|
);
|
|
3352
|
-
const [items, setItems] =
|
|
3353
|
-
const initialSnapshot =
|
|
3354
|
-
|
|
3359
|
+
const [items, setItems] = React9.useState(defaultItems);
|
|
3360
|
+
const initialSnapshot = React9.useRef("");
|
|
3361
|
+
React9.useEffect(() => {
|
|
3355
3362
|
var _a;
|
|
3356
3363
|
if (open) {
|
|
3357
3364
|
const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
EditExpensesModal,
|
|
6
6
|
EditIncomeModal,
|
|
7
7
|
EditLoanScenarioModal
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-JGUC3KCA.mjs";
|
|
9
9
|
import "../../chunk-JTK6VJXY.mjs";
|
|
10
10
|
import "../../chunk-ET4MTPIY.mjs";
|
|
11
11
|
import "../../chunk-ISUA7DSB.mjs";
|
|
12
12
|
import "../../chunk-IKXYTCSB.mjs";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-K6VCC2MK.mjs";
|
|
14
14
|
import "../../chunk-BS75ICOO.mjs";
|
|
15
|
-
import "../../chunk-
|
|
15
|
+
import "../../chunk-OIETBBXQ.mjs";
|
|
16
16
|
import "../../chunk-UMF6LLQK.mjs";
|
|
17
17
|
import "../../chunk-FBNEIYSE.mjs";
|
|
18
18
|
import "../../chunk-LHWJQNLG.mjs";
|
|
@@ -62,7 +62,7 @@ __export(opportunity_summary_tab_exports, {
|
|
|
62
62
|
OpportunitySummaryTab: () => OpportunitySummaryTab
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(opportunity_summary_tab_exports);
|
|
65
|
-
var
|
|
65
|
+
var React11 = __toESM(require("react"));
|
|
66
66
|
var import_react4 = require("react");
|
|
67
67
|
var import_lucide_react12 = require("lucide-react");
|
|
68
68
|
|
|
@@ -200,6 +200,7 @@ function Badge(_a) {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
// src/components/ui/select.tsx
|
|
203
|
+
var React3 = __toESM(require("react"));
|
|
203
204
|
var import_lucide_react = require("lucide-react");
|
|
204
205
|
var import_select = require("@base-ui/react/select");
|
|
205
206
|
|
|
@@ -213,6 +214,9 @@ function useThemeVars() {
|
|
|
213
214
|
|
|
214
215
|
// src/components/ui/select.tsx
|
|
215
216
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
217
|
+
var SelectPortalContext = React3.createContext(
|
|
218
|
+
void 0
|
|
219
|
+
);
|
|
216
220
|
function Select(_a) {
|
|
217
221
|
var props = __objRest(_a, []);
|
|
218
222
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
@@ -259,7 +263,8 @@ function SelectContent(_a) {
|
|
|
259
263
|
"style"
|
|
260
264
|
]);
|
|
261
265
|
const themeVars = useThemeVars();
|
|
262
|
-
|
|
266
|
+
const portalContainer = React3.useContext(SelectPortalContext);
|
|
267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
263
268
|
import_select.Select.Positioner,
|
|
264
269
|
{
|
|
265
270
|
className: "z-[200]",
|
|
@@ -736,7 +741,7 @@ function FinancialSubtotalBlock({
|
|
|
736
741
|
}
|
|
737
742
|
|
|
738
743
|
// src/components/ui/financial-cards.tsx
|
|
739
|
-
var
|
|
744
|
+
var React4 = __toESM(require("react"));
|
|
740
745
|
var import_lucide_react6 = require("lucide-react");
|
|
741
746
|
|
|
742
747
|
// src/lib/format-date.ts
|
|
@@ -906,7 +911,7 @@ function PropertyCard({
|
|
|
906
911
|
interestCharged,
|
|
907
912
|
principlePaidOff
|
|
908
913
|
}) {
|
|
909
|
-
const [expanded, setExpanded] =
|
|
914
|
+
const [expanded, setExpanded] = React4.useState(false);
|
|
910
915
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
911
916
|
"div",
|
|
912
917
|
{
|
|
@@ -1465,7 +1470,7 @@ function ExpensesCard({
|
|
|
1465
1470
|
}
|
|
1466
1471
|
|
|
1467
1472
|
// src/components/ui/opportunity-edit-modals.tsx
|
|
1468
|
-
var
|
|
1473
|
+
var React10 = __toESM(require("react"));
|
|
1469
1474
|
var import_lucide_react11 = require("lucide-react");
|
|
1470
1475
|
|
|
1471
1476
|
// src/components/ui/dialog.tsx
|
|
@@ -1491,7 +1496,7 @@ function DialogOverlay(_a) {
|
|
|
1491
1496
|
__spreadValues({
|
|
1492
1497
|
className: cn(
|
|
1493
1498
|
// WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
|
|
1494
|
-
"fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
1499
|
+
"fixed inset-0 z-50 bg-foreground/50 pointer-events-auto data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
|
|
1495
1500
|
className
|
|
1496
1501
|
),
|
|
1497
1502
|
"data-slot": "dialog-overlay"
|
|
@@ -1542,7 +1547,9 @@ function DialogContent(_a) {
|
|
|
1542
1547
|
// max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
|
|
1543
1548
|
// Fixed max-width is applied via inline style (sizeStyle) to avoid
|
|
1544
1549
|
// Tailwind v4 class-scanning gaps with dynamic class lookups.
|
|
1545
|
-
|
|
1550
|
+
// pointer-events-auto: Vaul Drawer (Radix DismissableLayer) sets body{pointer-events:none}
|
|
1551
|
+
// when open — dialog portals to body and must override that on its own element.
|
|
1552
|
+
"fixed left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] gap-4 border bg-background p-6 duration-200 outline-none pointer-events-auto data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
1546
1553
|
// "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
|
|
1547
1554
|
isAuto ? "w-auto" : "w-full",
|
|
1548
1555
|
align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
|
|
@@ -1697,12 +1704,12 @@ function Textarea(_a) {
|
|
|
1697
1704
|
}
|
|
1698
1705
|
|
|
1699
1706
|
// src/components/ui/date-picker.tsx
|
|
1700
|
-
var
|
|
1707
|
+
var React6 = __toESM(require("react"));
|
|
1701
1708
|
var import_date_fns2 = require("date-fns");
|
|
1702
1709
|
var import_lucide_react9 = require("lucide-react");
|
|
1703
1710
|
|
|
1704
1711
|
// src/components/ui/calendar.tsx
|
|
1705
|
-
var
|
|
1712
|
+
var React5 = __toESM(require("react"));
|
|
1706
1713
|
var import_lucide_react8 = require("lucide-react");
|
|
1707
1714
|
var import_react_day_picker = require("react-day-picker");
|
|
1708
1715
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
@@ -1875,8 +1882,8 @@ function CalendarDayButton(_a) {
|
|
|
1875
1882
|
"modifiers"
|
|
1876
1883
|
]);
|
|
1877
1884
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
1878
|
-
const ref =
|
|
1879
|
-
|
|
1885
|
+
const ref = React5.useRef(null);
|
|
1886
|
+
React5.useEffect(() => {
|
|
1880
1887
|
var _a2;
|
|
1881
1888
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
1882
1889
|
}, [modifiers.focused]);
|
|
@@ -1957,7 +1964,7 @@ function DatePicker({
|
|
|
1957
1964
|
className,
|
|
1958
1965
|
calendarProps
|
|
1959
1966
|
}) {
|
|
1960
|
-
const [open, setOpen] =
|
|
1967
|
+
const [open, setOpen] = React6.useState(false);
|
|
1961
1968
|
function handleDaySelect(day) {
|
|
1962
1969
|
if (!day) {
|
|
1963
1970
|
onChange == null ? void 0 : onChange(void 0);
|
|
@@ -2046,10 +2053,10 @@ function DatePicker({
|
|
|
2046
2053
|
}
|
|
2047
2054
|
|
|
2048
2055
|
// src/components/ui/slider.tsx
|
|
2049
|
-
var
|
|
2056
|
+
var React7 = __toESM(require("react"));
|
|
2050
2057
|
var import_slider = require("@base-ui/react/slider");
|
|
2051
2058
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2052
|
-
var Slider =
|
|
2059
|
+
var Slider = React7.forwardRef(
|
|
2053
2060
|
({
|
|
2054
2061
|
className,
|
|
2055
2062
|
value,
|
|
@@ -2118,11 +2125,11 @@ var Slider = React6.forwardRef(
|
|
|
2118
2125
|
Slider.displayName = "Slider";
|
|
2119
2126
|
|
|
2120
2127
|
// src/components/ui/form-primitives.tsx
|
|
2121
|
-
var
|
|
2128
|
+
var React9 = __toESM(require("react"));
|
|
2122
2129
|
var import_lucide_react10 = require("lucide-react");
|
|
2123
2130
|
|
|
2124
2131
|
// src/components/ui/toggle-group.tsx
|
|
2125
|
-
var
|
|
2132
|
+
var React8 = __toESM(require("react"));
|
|
2126
2133
|
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
2127
2134
|
var import_toggle2 = require("@base-ui/react/toggle");
|
|
2128
2135
|
|
|
@@ -2153,7 +2160,7 @@ var toggleVariants = (0, import_class_variance_authority4.cva)(
|
|
|
2153
2160
|
|
|
2154
2161
|
// src/components/ui/toggle-group.tsx
|
|
2155
2162
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2156
|
-
var ToggleGroupContext =
|
|
2163
|
+
var ToggleGroupContext = React8.createContext({
|
|
2157
2164
|
size: "default",
|
|
2158
2165
|
variant: "default",
|
|
2159
2166
|
spacing: 0
|
|
@@ -2205,7 +2212,7 @@ function ToggleGroupItem(_a) {
|
|
|
2205
2212
|
"variant",
|
|
2206
2213
|
"size"
|
|
2207
2214
|
]);
|
|
2208
|
-
const context =
|
|
2215
|
+
const context = React8.useContext(ToggleGroupContext);
|
|
2209
2216
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2210
2217
|
import_toggle2.Toggle,
|
|
2211
2218
|
__spreadProps(__spreadValues({
|
|
@@ -2249,13 +2256,13 @@ function CurrencyInputWithSlider({
|
|
|
2249
2256
|
onValueChange,
|
|
2250
2257
|
className
|
|
2251
2258
|
}) {
|
|
2252
|
-
const [internalValue, setInternalValue] =
|
|
2259
|
+
const [internalValue, setInternalValue] = React9.useState(defaultValue);
|
|
2253
2260
|
const numericValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
2254
|
-
const [inputText, setInputText] =
|
|
2261
|
+
const [inputText, setInputText] = React9.useState(
|
|
2255
2262
|
formatNumberToCurrency(numericValue)
|
|
2256
2263
|
);
|
|
2257
|
-
const [isFocused, setIsFocused] =
|
|
2258
|
-
|
|
2264
|
+
const [isFocused, setIsFocused] = React9.useState(false);
|
|
2265
|
+
React9.useEffect(() => {
|
|
2259
2266
|
if (!isFocused) {
|
|
2260
2267
|
setInputText(formatNumberToCurrency(numericValue));
|
|
2261
2268
|
}
|
|
@@ -2353,13 +2360,13 @@ function AddressAutocomplete({
|
|
|
2353
2360
|
onSelect,
|
|
2354
2361
|
className
|
|
2355
2362
|
}) {
|
|
2356
|
-
const [internalValue, setInternalValue] =
|
|
2363
|
+
const [internalValue, setInternalValue] = React9.useState("");
|
|
2357
2364
|
const inputValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
2358
|
-
const [open, setOpen] =
|
|
2359
|
-
const [activeIndex, setActiveIndex] =
|
|
2360
|
-
const containerRef =
|
|
2361
|
-
const listRef =
|
|
2362
|
-
const filtered =
|
|
2365
|
+
const [open, setOpen] = React9.useState(false);
|
|
2366
|
+
const [activeIndex, setActiveIndex] = React9.useState(-1);
|
|
2367
|
+
const containerRef = React9.useRef(null);
|
|
2368
|
+
const listRef = React9.useRef(null);
|
|
2369
|
+
const filtered = React9.useMemo(() => {
|
|
2363
2370
|
if (!inputValue.trim()) return suggestions.slice(0, 5);
|
|
2364
2371
|
const q = inputValue.toLowerCase();
|
|
2365
2372
|
return suggestions.filter((s) => s.label.toLowerCase().includes(q)).slice(0, 5);
|
|
@@ -2389,7 +2396,7 @@ function AddressAutocomplete({
|
|
|
2389
2396
|
setOpen(false);
|
|
2390
2397
|
}
|
|
2391
2398
|
};
|
|
2392
|
-
|
|
2399
|
+
React9.useEffect(() => {
|
|
2393
2400
|
const handler = (e) => {
|
|
2394
2401
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
2395
2402
|
setOpen(false);
|
|
@@ -2466,7 +2473,7 @@ function OwnershipSplit({
|
|
|
2466
2473
|
onOwnersChange,
|
|
2467
2474
|
className
|
|
2468
2475
|
}) {
|
|
2469
|
-
const [internalOwners, setInternalOwners] =
|
|
2476
|
+
const [internalOwners, setInternalOwners] = React9.useState(DEFAULT_OWNERS);
|
|
2470
2477
|
const owners = controlledOwners !== void 0 ? controlledOwners : internalOwners;
|
|
2471
2478
|
const setOwners = (updated) => {
|
|
2472
2479
|
if (controlledOwners === void 0) setInternalOwners(updated);
|
|
@@ -2871,9 +2878,9 @@ function EditLoanScenarioModal({
|
|
|
2871
2878
|
container,
|
|
2872
2879
|
className
|
|
2873
2880
|
}) {
|
|
2874
|
-
const [form, setForm] =
|
|
2875
|
-
const initialSnapshot =
|
|
2876
|
-
|
|
2881
|
+
const [form, setForm] = React10.useState(__spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData));
|
|
2882
|
+
const initialSnapshot = React10.useRef("");
|
|
2883
|
+
React10.useEffect(() => {
|
|
2877
2884
|
if (open) {
|
|
2878
2885
|
const data = __spreadValues(__spreadValues({}, LOAN_SCENARIO_DEFAULTS), initialData);
|
|
2879
2886
|
setForm(data);
|
|
@@ -3133,11 +3140,11 @@ function EditAssetsModal({
|
|
|
3133
3140
|
container,
|
|
3134
3141
|
className
|
|
3135
3142
|
}) {
|
|
3136
|
-
const [items, setItems] =
|
|
3143
|
+
const [items, setItems] = React10.useState(
|
|
3137
3144
|
initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()]
|
|
3138
3145
|
);
|
|
3139
|
-
const initialSnapshot =
|
|
3140
|
-
|
|
3146
|
+
const initialSnapshot = React10.useRef("");
|
|
3147
|
+
React10.useEffect(() => {
|
|
3141
3148
|
if (open) {
|
|
3142
3149
|
const data = initialItems.length > 0 ? initialItems : [makeDefaultAssetItem()];
|
|
3143
3150
|
setItems(data);
|
|
@@ -3430,11 +3437,11 @@ function EditDebtsModal({
|
|
|
3430
3437
|
container,
|
|
3431
3438
|
className
|
|
3432
3439
|
}) {
|
|
3433
|
-
const [items, setItems] =
|
|
3440
|
+
const [items, setItems] = React10.useState(
|
|
3434
3441
|
initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()]
|
|
3435
3442
|
);
|
|
3436
|
-
const initialSnapshot =
|
|
3437
|
-
|
|
3443
|
+
const initialSnapshot = React10.useRef("");
|
|
3444
|
+
React10.useEffect(() => {
|
|
3438
3445
|
if (open) {
|
|
3439
3446
|
const data = initialItems.length > 0 ? initialItems : [makeDefaultDebtItem()];
|
|
3440
3447
|
setItems(data);
|
|
@@ -3756,9 +3763,9 @@ function EditAboutApplicantModal({
|
|
|
3756
3763
|
container,
|
|
3757
3764
|
className
|
|
3758
3765
|
}) {
|
|
3759
|
-
const [form, setForm] =
|
|
3760
|
-
const initialSnapshot =
|
|
3761
|
-
|
|
3766
|
+
const [form, setForm] = React10.useState(__spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData));
|
|
3767
|
+
const initialSnapshot = React10.useRef("");
|
|
3768
|
+
React10.useEffect(() => {
|
|
3762
3769
|
if (open) {
|
|
3763
3770
|
const data = __spreadValues(__spreadValues({}, ABOUT_APPLICANT_DEFAULTS), initialData);
|
|
3764
3771
|
setForm(data);
|
|
@@ -4030,7 +4037,7 @@ function EditIncomeModal({
|
|
|
4030
4037
|
container,
|
|
4031
4038
|
className
|
|
4032
4039
|
}) {
|
|
4033
|
-
const defaultItems =
|
|
4040
|
+
const defaultItems = React10.useMemo(
|
|
4034
4041
|
() => {
|
|
4035
4042
|
var _a;
|
|
4036
4043
|
return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
|
|
@@ -4038,9 +4045,9 @@ function EditIncomeModal({
|
|
|
4038
4045
|
[]
|
|
4039
4046
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
4040
4047
|
);
|
|
4041
|
-
const [items, setItems] =
|
|
4042
|
-
const initialSnapshot =
|
|
4043
|
-
|
|
4048
|
+
const [items, setItems] = React10.useState(defaultItems);
|
|
4049
|
+
const initialSnapshot = React10.useRef("");
|
|
4050
|
+
React10.useEffect(() => {
|
|
4044
4051
|
var _a;
|
|
4045
4052
|
if (open) {
|
|
4046
4053
|
const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultIncomeItem()];
|
|
@@ -4257,7 +4264,7 @@ function EditExpensesModal({
|
|
|
4257
4264
|
container,
|
|
4258
4265
|
className
|
|
4259
4266
|
}) {
|
|
4260
|
-
const defaultItems =
|
|
4267
|
+
const defaultItems = React10.useMemo(
|
|
4261
4268
|
() => {
|
|
4262
4269
|
var _a;
|
|
4263
4270
|
return ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
|
|
@@ -4265,9 +4272,9 @@ function EditExpensesModal({
|
|
|
4265
4272
|
[]
|
|
4266
4273
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
4267
4274
|
);
|
|
4268
|
-
const [items, setItems] =
|
|
4269
|
-
const initialSnapshot =
|
|
4270
|
-
|
|
4275
|
+
const [items, setItems] = React10.useState(defaultItems);
|
|
4276
|
+
const initialSnapshot = React10.useRef("");
|
|
4277
|
+
React10.useEffect(() => {
|
|
4271
4278
|
var _a;
|
|
4272
4279
|
if (open) {
|
|
4273
4280
|
const data = ((_a = initialData == null ? void 0 : initialData.items) == null ? void 0 : _a.length) ? initialData.items : [makeDefaultExpenseItem()];
|
|
@@ -4784,7 +4791,7 @@ function OpportunitySummaryTab({
|
|
|
4784
4791
|
var _a2;
|
|
4785
4792
|
return (_a2 = docStatusOverrides[doc.id]) != null ? _a2 : doc.status;
|
|
4786
4793
|
}
|
|
4787
|
-
const checklistProgress =
|
|
4794
|
+
const checklistProgress = React11.useMemo(() => {
|
|
4788
4795
|
var _a2, _b2;
|
|
4789
4796
|
const map = /* @__PURE__ */ new Map();
|
|
4790
4797
|
for (const doc of documents) {
|
|
@@ -4802,7 +4809,7 @@ function OpportunitySummaryTab({
|
|
|
4802
4809
|
}
|
|
4803
4810
|
return Array.from(map.entries()).map(([name, data]) => __spreadValues({ name }, data));
|
|
4804
4811
|
}, [documents, docStatusOverrides]);
|
|
4805
|
-
const groupedDocs =
|
|
4812
|
+
const groupedDocs = React11.useMemo(() => {
|
|
4806
4813
|
var _a2;
|
|
4807
4814
|
if (documents.length <= 5 || !documents.some((d) => d.checklistItem))
|
|
4808
4815
|
return null;
|