@splpi/estore-shared-components 7.0.4 → 7.0.5
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.mts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +613 -576
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +227 -197
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,12 +31,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
APIError: () => APIError,
|
|
34
|
+
APPLICATION_DATA_CHANGE_EVENT: () => APPLICATION_DATA_CHANGE_EVENT,
|
|
34
35
|
Beneficiary: () => beneficiary_default,
|
|
35
36
|
BottomQuickActions: () => BottomQuickActions_default,
|
|
36
37
|
DocumentUploadCard: () => DocumentUploadCard,
|
|
37
38
|
GeoApifyService: () => GeoApifyService,
|
|
38
39
|
GetStarted: () => GetStarted_default,
|
|
39
40
|
HealthDeclaration: () => HealthDeclaration_default,
|
|
41
|
+
LIFE_PLAN_APPLICATION_KEY: () => LIFE_PLAN_APPLICATION_KEY,
|
|
40
42
|
LifePlanApplication1: () => LifePlanApplication1_default,
|
|
41
43
|
LifePlanApplication2: () => LifePlanApplication2_default,
|
|
42
44
|
LifePlanApplication3: () => LifePlanApplication3_default,
|
|
@@ -50,14 +52,19 @@ __export(index_exports, {
|
|
|
50
52
|
UserProfile: () => UserProfile_default,
|
|
51
53
|
api: () => api,
|
|
52
54
|
apiClient: () => apiClient,
|
|
55
|
+
clearApplicationData: () => clearApplicationData,
|
|
53
56
|
clearOcrResult: () => clearOcrResult,
|
|
54
57
|
configureApi: () => configureApi,
|
|
55
58
|
createEmptyApplicationData: () => createEmptyApplicationData,
|
|
59
|
+
loadApplicationData: () => loadApplicationData,
|
|
56
60
|
loadApplicationDataFromLocalStorage: () => loadApplicationDataFromLocalStorage,
|
|
57
61
|
markOcrApplied: () => markOcrApplied,
|
|
58
62
|
readOcrResult: () => readOcrResult,
|
|
63
|
+
saveApplicationData: () => saveApplicationData,
|
|
59
64
|
saveApplicationDataToLocalStorage: () => saveApplicationDataToLocalStorage,
|
|
60
65
|
saveOcrResult: () => saveOcrResult,
|
|
66
|
+
updateApplicationData: () => updateApplicationData,
|
|
67
|
+
useApplicationData: () => useApplicationData,
|
|
61
68
|
useOcr: () => useOcr
|
|
62
69
|
});
|
|
63
70
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -288,7 +295,7 @@ var STANDARD_ICON_BUTTON_STYLES = {
|
|
|
288
295
|
var OCR_STORAGE_KEY = "ocrResult";
|
|
289
296
|
var readStored = () => {
|
|
290
297
|
try {
|
|
291
|
-
const raw =
|
|
298
|
+
const raw = sessionStorage.getItem(OCR_STORAGE_KEY);
|
|
292
299
|
return raw ? JSON.parse(raw) : null;
|
|
293
300
|
} catch {
|
|
294
301
|
return null;
|
|
@@ -305,7 +312,7 @@ var markOcrApplied = (section) => {
|
|
|
305
312
|
const stored = readStored();
|
|
306
313
|
if (!stored || stored.applied?.[section]) return false;
|
|
307
314
|
try {
|
|
308
|
-
|
|
315
|
+
sessionStorage.setItem(
|
|
309
316
|
OCR_STORAGE_KEY,
|
|
310
317
|
JSON.stringify({ ...stored, applied: { ...stored.applied, [section]: true } })
|
|
311
318
|
);
|
|
@@ -317,14 +324,14 @@ var markOcrApplied = (section) => {
|
|
|
317
324
|
var saveOcrResult = (value) => {
|
|
318
325
|
if (typeof window === "undefined") return;
|
|
319
326
|
try {
|
|
320
|
-
|
|
327
|
+
sessionStorage.setItem(OCR_STORAGE_KEY, JSON.stringify(value));
|
|
321
328
|
} catch {
|
|
322
329
|
}
|
|
323
330
|
};
|
|
324
331
|
var clearOcrResult = () => {
|
|
325
332
|
if (typeof window === "undefined") return;
|
|
326
333
|
try {
|
|
327
|
-
|
|
334
|
+
sessionStorage.removeItem(OCR_STORAGE_KEY);
|
|
328
335
|
} catch {
|
|
329
336
|
}
|
|
330
337
|
};
|
|
@@ -440,22 +447,22 @@ var LifePlanApplication1 = ({
|
|
|
440
447
|
onUpdate
|
|
441
448
|
}) => {
|
|
442
449
|
const [formData, setFormData] = (0, import_react4.useState)(() => applyOcr({
|
|
443
|
-
firstName: initialData?.firstName ?? "
|
|
444
|
-
middleName: initialData?.middleName ?? "
|
|
445
|
-
lastName: initialData?.lastName ?? "
|
|
450
|
+
firstName: initialData?.firstName ?? "",
|
|
451
|
+
middleName: initialData?.middleName ?? "",
|
|
452
|
+
lastName: initialData?.lastName ?? "",
|
|
446
453
|
suffix: initialData?.suffix ?? "",
|
|
447
|
-
birthDate: initialData?.birthDate ?? "
|
|
448
|
-
idType: initialData?.idType ?? "
|
|
449
|
-
idNumber: initialData?.idNumber ?? "
|
|
450
|
-
height: initialData?.height ??
|
|
451
|
-
weight: initialData?.weight ??
|
|
452
|
-
gender: initialData?.gender ?? "
|
|
453
|
-
civilStatus: initialData?.civilStatus ?? "
|
|
454
|
-
nationality: initialData?.nationality ?? "
|
|
455
|
-
mobileNumber: initialData?.mobileNumber ?? "
|
|
456
|
-
emailAddress: initialData?.emailAddress ?? "
|
|
457
|
-
mailingAddress: initialData?.mailingAddress ?? "
|
|
458
|
-
landLineNumber: initialData?.landLineNumber ?? "
|
|
454
|
+
birthDate: initialData?.birthDate ?? "",
|
|
455
|
+
idType: initialData?.idType ?? "",
|
|
456
|
+
idNumber: initialData?.idNumber ?? "",
|
|
457
|
+
height: initialData?.height ?? 0,
|
|
458
|
+
weight: initialData?.weight ?? 0,
|
|
459
|
+
gender: initialData?.gender ?? "",
|
|
460
|
+
civilStatus: initialData?.civilStatus ?? "",
|
|
461
|
+
nationality: initialData?.nationality ?? "",
|
|
462
|
+
mobileNumber: initialData?.mobileNumber ?? "",
|
|
463
|
+
emailAddress: initialData?.emailAddress ?? "",
|
|
464
|
+
mailingAddress: initialData?.mailingAddress ?? "",
|
|
465
|
+
landLineNumber: initialData?.landLineNumber ?? ""
|
|
459
466
|
}, readOcrResult("personal")));
|
|
460
467
|
const updateFormData = (nextData) => {
|
|
461
468
|
setFormData(nextData);
|
|
@@ -926,15 +933,16 @@ var matchOption = (candidates, options) => {
|
|
|
926
933
|
return "";
|
|
927
934
|
};
|
|
928
935
|
var LifePlanApplication2 = ({
|
|
936
|
+
initialData,
|
|
929
937
|
onAddressUpdate,
|
|
930
938
|
parseAddress
|
|
931
939
|
}) => {
|
|
932
|
-
const [lot, setLot] = (0, import_react6.useState)("");
|
|
933
|
-
const [street, setStreet] = (0, import_react6.useState)("");
|
|
934
|
-
const [city, setCity] = (0, import_react6.useState)("");
|
|
935
|
-
const [province, setProvince] = (0, import_react6.useState)("");
|
|
936
|
-
const [district, setDistrict] = (0, import_react6.useState)("");
|
|
937
|
-
const [barangay, setBarangay] = (0, import_react6.useState)("");
|
|
940
|
+
const [lot, setLot] = (0, import_react6.useState)(initialData?.lot ?? "");
|
|
941
|
+
const [street, setStreet] = (0, import_react6.useState)(initialData?.street ?? "");
|
|
942
|
+
const [city, setCity] = (0, import_react6.useState)(initialData?.city ?? "");
|
|
943
|
+
const [province, setProvince] = (0, import_react6.useState)(initialData?.province ?? "");
|
|
944
|
+
const [district, setDistrict] = (0, import_react6.useState)(initialData?.district ?? "");
|
|
945
|
+
const [barangay, setBarangay] = (0, import_react6.useState)(initialData?.barangay ?? "");
|
|
938
946
|
(0, import_react6.useEffect)(() => {
|
|
939
947
|
if (!parseAddress) return;
|
|
940
948
|
const ocr = readOcrResult("address");
|
|
@@ -1057,13 +1065,13 @@ var LifePlanApplication3 = ({
|
|
|
1057
1065
|
onUpdate
|
|
1058
1066
|
}) => {
|
|
1059
1067
|
const [formData, setFormData] = import_react8.default.useState({
|
|
1060
|
-
occupation: initialData?.occupation ?? "
|
|
1061
|
-
employerName: initialData?.employerName ?? "
|
|
1062
|
-
employmentStatus: initialData?.employmentStatus ?? "
|
|
1063
|
-
officeAddress: initialData?.officeAddress ?? "
|
|
1064
|
-
TIN: initialData?.TIN ?? "
|
|
1065
|
-
SSS: initialData?.SSS ?? "
|
|
1066
|
-
sourceOfIncome: initialData?.sourceOfIncome ?? "
|
|
1068
|
+
occupation: initialData?.occupation ?? "",
|
|
1069
|
+
employerName: initialData?.employerName ?? "",
|
|
1070
|
+
employmentStatus: initialData?.employmentStatus ?? "",
|
|
1071
|
+
officeAddress: initialData?.officeAddress ?? "",
|
|
1072
|
+
TIN: initialData?.TIN ?? "",
|
|
1073
|
+
SSS: initialData?.SSS ?? "",
|
|
1074
|
+
sourceOfIncome: initialData?.sourceOfIncome ?? ""
|
|
1067
1075
|
});
|
|
1068
1076
|
const updateFormData = (nextData) => {
|
|
1069
1077
|
setFormData(nextData);
|
|
@@ -1190,6 +1198,7 @@ var RowItem = ({
|
|
|
1190
1198
|
|
|
1191
1199
|
// src/lib/applicationData.ts
|
|
1192
1200
|
var LIFE_PLAN_APPLICATION_KEY = "LifePlanApplication";
|
|
1201
|
+
var APPLICATION_DATA_CHANGE_EVENT = "lifeplan-application:change";
|
|
1193
1202
|
var createEmptyApplicationData = () => ({
|
|
1194
1203
|
personalInfo: {
|
|
1195
1204
|
firstName: "",
|
|
@@ -1234,19 +1243,57 @@ var createEmptyApplicationData = () => ({
|
|
|
1234
1243
|
healthDeclaration4: false
|
|
1235
1244
|
}
|
|
1236
1245
|
});
|
|
1237
|
-
var
|
|
1246
|
+
var getStorage = () => {
|
|
1238
1247
|
if (typeof window === "undefined") return null;
|
|
1239
1248
|
try {
|
|
1240
|
-
|
|
1249
|
+
return window.sessionStorage;
|
|
1250
|
+
} catch {
|
|
1251
|
+
return null;
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
var notifyChange = (storageKey) => {
|
|
1255
|
+
window.dispatchEvent(
|
|
1256
|
+
new CustomEvent(APPLICATION_DATA_CHANGE_EVENT, { detail: { storageKey } })
|
|
1257
|
+
);
|
|
1258
|
+
};
|
|
1259
|
+
var loadApplicationData = (storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1260
|
+
const storage = getStorage();
|
|
1261
|
+
if (!storage) return null;
|
|
1262
|
+
try {
|
|
1263
|
+
const stored = storage.getItem(storageKey);
|
|
1241
1264
|
return stored ? JSON.parse(stored) : null;
|
|
1242
1265
|
} catch {
|
|
1243
1266
|
return null;
|
|
1244
1267
|
}
|
|
1245
1268
|
};
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1248
|
-
|
|
1269
|
+
var saveApplicationData = (data, storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1270
|
+
const storage = getStorage();
|
|
1271
|
+
if (!storage) return;
|
|
1272
|
+
try {
|
|
1273
|
+
storage.setItem(storageKey, JSON.stringify(data));
|
|
1274
|
+
} catch {
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
notifyChange(storageKey);
|
|
1249
1278
|
};
|
|
1279
|
+
var updateApplicationData = (patch, storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1280
|
+
const current = loadApplicationData(storageKey) ?? createEmptyApplicationData();
|
|
1281
|
+
const next = { ...current, ...patch };
|
|
1282
|
+
saveApplicationData(next, storageKey);
|
|
1283
|
+
return next;
|
|
1284
|
+
};
|
|
1285
|
+
var clearApplicationData = (storageKey = LIFE_PLAN_APPLICATION_KEY) => {
|
|
1286
|
+
const storage = getStorage();
|
|
1287
|
+
if (!storage) return;
|
|
1288
|
+
try {
|
|
1289
|
+
storage.removeItem(storageKey);
|
|
1290
|
+
} catch {
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
notifyChange(storageKey);
|
|
1294
|
+
};
|
|
1295
|
+
var loadApplicationDataFromLocalStorage = loadApplicationData;
|
|
1296
|
+
var saveApplicationDataToLocalStorage = saveApplicationData;
|
|
1250
1297
|
|
|
1251
1298
|
// src/NewSaleForm/beneficiary.tsx
|
|
1252
1299
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -1300,13 +1347,13 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1300
1347
|
contingent.length > 0 ? contingent[0] : void 0,
|
|
1301
1348
|
allBeneficiaries
|
|
1302
1349
|
);
|
|
1303
|
-
const currentData =
|
|
1350
|
+
const currentData = loadApplicationData() ?? createEmptyApplicationData();
|
|
1304
1351
|
const {
|
|
1305
1352
|
principalBeneficiary: _oldPrincipal,
|
|
1306
1353
|
contingentBeneficiary: _oldContingent,
|
|
1307
1354
|
...restData
|
|
1308
1355
|
} = currentData;
|
|
1309
|
-
|
|
1356
|
+
saveApplicationData({
|
|
1310
1357
|
...restData,
|
|
1311
1358
|
beneficiaries: allBeneficiaries,
|
|
1312
1359
|
...principal[0] ? { principalBeneficiary: principal[0] } : {},
|
|
@@ -1315,7 +1362,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1315
1362
|
};
|
|
1316
1363
|
(0, import_react11.useEffect)(() => {
|
|
1317
1364
|
const timeoutId = window.setTimeout(() => {
|
|
1318
|
-
const currentData =
|
|
1365
|
+
const currentData = loadApplicationData();
|
|
1319
1366
|
if (!currentData) return;
|
|
1320
1367
|
const storedBeneficiaries = currentData.beneficiaries ?? [];
|
|
1321
1368
|
let principalFromStorage = storedBeneficiaries.filter(
|
|
@@ -1968,29 +2015,18 @@ var HealthDeclaration = () => {
|
|
|
1968
2015
|
healthDeclaration3: false,
|
|
1969
2016
|
healthDeclaration4: false
|
|
1970
2017
|
});
|
|
2018
|
+
const [hydrated, setHydrated] = (0, import_react12.useState)(false);
|
|
1971
2019
|
(0, import_react12.useEffect)(() => {
|
|
1972
|
-
|
|
1973
|
-
if (
|
|
1974
|
-
appData = createEmptyApplicationData();
|
|
1975
|
-
saveApplicationDataToLocalStorage(appData);
|
|
1976
|
-
}
|
|
1977
|
-
if (appData && appData.healthDeclaration) {
|
|
2020
|
+
const appData = loadApplicationData();
|
|
2021
|
+
if (appData?.healthDeclaration) {
|
|
1978
2022
|
setHealthDeclarationValues(appData.healthDeclaration);
|
|
1979
2023
|
}
|
|
2024
|
+
setHydrated(true);
|
|
1980
2025
|
}, []);
|
|
1981
2026
|
(0, import_react12.useEffect)(() => {
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
appData.healthDeclaration = healthDeclarationValues;
|
|
1986
|
-
saveApplicationDataToLocalStorage(appData);
|
|
1987
|
-
console.log(
|
|
1988
|
-
"Health Declaration saved to localStorage",
|
|
1989
|
-
healthDeclarationValues
|
|
1990
|
-
);
|
|
1991
|
-
}
|
|
1992
|
-
};
|
|
1993
|
-
}, [healthDeclarationValues]);
|
|
2027
|
+
if (!hydrated) return;
|
|
2028
|
+
updateApplicationData({ healthDeclaration: healthDeclarationValues });
|
|
2029
|
+
}, [healthDeclarationValues, hydrated]);
|
|
1994
2030
|
const items = [
|
|
1995
2031
|
{
|
|
1996
2032
|
value: "first-item",
|
|
@@ -2306,7 +2342,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2306
2342
|
const [openSections, setOpenSections] = (0, import_react18.useState)(["personal"]);
|
|
2307
2343
|
(0, import_react18.useEffect)(() => {
|
|
2308
2344
|
const timeoutId = window.setTimeout(() => {
|
|
2309
|
-
const saved =
|
|
2345
|
+
const saved = loadApplicationData();
|
|
2310
2346
|
if (saved) setApplicationData(saved);
|
|
2311
2347
|
setHydrated(true);
|
|
2312
2348
|
}, 0);
|
|
@@ -2314,7 +2350,11 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2314
2350
|
}, []);
|
|
2315
2351
|
(0, import_react18.useEffect)(() => {
|
|
2316
2352
|
if (!hydrated) return;
|
|
2317
|
-
|
|
2353
|
+
updateApplicationData({
|
|
2354
|
+
personalInfo: applicationData.personalInfo,
|
|
2355
|
+
address: applicationData.address,
|
|
2356
|
+
employment: applicationData.employment
|
|
2357
|
+
});
|
|
2318
2358
|
}, [applicationData, hydrated]);
|
|
2319
2359
|
const isComplete = isPersonalComplete(applicationData.personalInfo) && isAddressComplete(applicationData.address);
|
|
2320
2360
|
(0, import_react18.useEffect)(() => {
|
|
@@ -2375,6 +2415,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2375
2415
|
page: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2376
2416
|
LifePlanApplication2_default,
|
|
2377
2417
|
{
|
|
2418
|
+
initialData: applicationData.address,
|
|
2378
2419
|
onAddressUpdate: handleAddressUpdate,
|
|
2379
2420
|
...parseAddress ? { parseAddress } : {}
|
|
2380
2421
|
}
|
|
@@ -2402,6 +2443,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2402
2443
|
(prev) => prev.includes(value) ? prev.filter((sectionValue) => sectionValue !== value) : [...prev, value]
|
|
2403
2444
|
);
|
|
2404
2445
|
};
|
|
2446
|
+
if (!hydrated) return null;
|
|
2405
2447
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react17.Box, { w: "full", children: [
|
|
2406
2448
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2407
2449
|
import_react17.Flex,
|
|
@@ -2451,21 +2493,21 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2451
2493
|
var LifePlanApplicationFormWrapper_default = LifePlanApplicationFormWrapper;
|
|
2452
2494
|
|
|
2453
2495
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
2454
|
-
var
|
|
2455
|
-
var
|
|
2496
|
+
var import_react27 = require("@chakra-ui/react");
|
|
2497
|
+
var import_react28 = require("react");
|
|
2456
2498
|
|
|
2457
2499
|
// src/NewSaleForm/data/lifePlanSteps.tsx
|
|
2458
2500
|
var import_fa4 = require("react-icons/fa");
|
|
2459
2501
|
var import_io3 = require("react-icons/io");
|
|
2460
2502
|
|
|
2461
2503
|
// src/NewSaleForm/confirmation.tsx
|
|
2462
|
-
var
|
|
2504
|
+
var import_react23 = require("@chakra-ui/react");
|
|
2463
2505
|
var import_st_peter_ui6 = require("st-peter-ui");
|
|
2464
2506
|
var import_fa6 = require("react-icons/fa6");
|
|
2465
2507
|
var import_fa3 = require("react-icons/fa");
|
|
2466
2508
|
var import_io2 = require("react-icons/io");
|
|
2467
2509
|
var import_fi = require("react-icons/fi");
|
|
2468
|
-
var
|
|
2510
|
+
var import_react24 = require("react");
|
|
2469
2511
|
|
|
2470
2512
|
// src/NewSaleForm/data/checkBoxList.tsx
|
|
2471
2513
|
var import_react19 = require("@chakra-ui/react");
|
|
@@ -2568,9 +2610,22 @@ var checkboxList = [
|
|
|
2568
2610
|
}
|
|
2569
2611
|
];
|
|
2570
2612
|
|
|
2613
|
+
// src/hooks/useApplicationData.ts
|
|
2614
|
+
var import_react20 = require("react");
|
|
2615
|
+
function useApplicationData(storageKey = LIFE_PLAN_APPLICATION_KEY) {
|
|
2616
|
+
const [data, setData] = (0, import_react20.useState)(null);
|
|
2617
|
+
(0, import_react20.useEffect)(() => {
|
|
2618
|
+
const refresh = () => setData(loadApplicationData(storageKey));
|
|
2619
|
+
refresh();
|
|
2620
|
+
window.addEventListener(APPLICATION_DATA_CHANGE_EVENT, refresh);
|
|
2621
|
+
return () => window.removeEventListener(APPLICATION_DATA_CHANGE_EVENT, refresh);
|
|
2622
|
+
}, [storageKey]);
|
|
2623
|
+
return data;
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2571
2626
|
// src/NewSaleForm/ui/info-card-accordion.tsx
|
|
2572
|
-
var
|
|
2573
|
-
var
|
|
2627
|
+
var import_react21 = require("@chakra-ui/react");
|
|
2628
|
+
var import_react22 = require("react");
|
|
2574
2629
|
var import_lu4 = require("react-icons/lu");
|
|
2575
2630
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2576
2631
|
function InfoCardAccordion({
|
|
@@ -2584,7 +2639,7 @@ function InfoCardAccordion({
|
|
|
2584
2639
|
onToggle,
|
|
2585
2640
|
onEdit
|
|
2586
2641
|
}) {
|
|
2587
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2642
|
+
const [internalOpen, setInternalOpen] = (0, import_react22.useState)(defaultOpen);
|
|
2588
2643
|
const isControlled = controlledOpen !== void 0;
|
|
2589
2644
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
2590
2645
|
const toggle = () => {
|
|
@@ -2602,7 +2657,7 @@ function InfoCardAccordion({
|
|
|
2602
2657
|
};
|
|
2603
2658
|
const activeIcon = isOpen && openedIcon ? openedIcon : icon;
|
|
2604
2659
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2605
|
-
|
|
2660
|
+
import_react21.Box,
|
|
2606
2661
|
{
|
|
2607
2662
|
w: "full",
|
|
2608
2663
|
position: "relative",
|
|
@@ -2616,7 +2671,7 @@ function InfoCardAccordion({
|
|
|
2616
2671
|
cursor: "pointer",
|
|
2617
2672
|
children: [
|
|
2618
2673
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2619
|
-
|
|
2674
|
+
import_react21.Flex,
|
|
2620
2675
|
{
|
|
2621
2676
|
align: "center",
|
|
2622
2677
|
justify: "space-between",
|
|
@@ -2631,9 +2686,9 @@ function InfoCardAccordion({
|
|
|
2631
2686
|
_hover: { bg: "gray.50" },
|
|
2632
2687
|
transition: "background 0.15s ease",
|
|
2633
2688
|
children: [
|
|
2634
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Flex, { align: "center", gap: 2, children: [
|
|
2635
2690
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2636
|
-
|
|
2691
|
+
import_react21.Box,
|
|
2637
2692
|
{
|
|
2638
2693
|
p: 2,
|
|
2639
2694
|
borderRadius: "full",
|
|
@@ -2643,17 +2698,17 @@ function InfoCardAccordion({
|
|
|
2643
2698
|
children: activeIcon
|
|
2644
2699
|
}
|
|
2645
2700
|
),
|
|
2646
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2647
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2648
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Box, { children: [
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Text, { fontWeight: "bold", fontSize: "md", lineHeight: "1.2", children: title }),
|
|
2703
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Flex, { align: "center", gap: 1, fontSize: "xs", color: "gray.500", children: [
|
|
2649
2704
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuHash, { size: 12 }),
|
|
2650
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Text, { children: subtitle })
|
|
2651
2706
|
] })
|
|
2652
2707
|
] })
|
|
2653
2708
|
] }),
|
|
2654
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Flex, { align: "center", gap: 1, flexShrink: 0, children: [
|
|
2655
2710
|
onEdit && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2656
|
-
|
|
2711
|
+
import_react21.Button,
|
|
2657
2712
|
{
|
|
2658
2713
|
variant: "ghost",
|
|
2659
2714
|
p: 0,
|
|
@@ -2665,15 +2720,15 @@ function InfoCardAccordion({
|
|
|
2665
2720
|
e.stopPropagation();
|
|
2666
2721
|
onEdit();
|
|
2667
2722
|
},
|
|
2668
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Icon, { as: import_lu4.LuPencil, boxSize: 4 })
|
|
2669
2724
|
}
|
|
2670
2725
|
),
|
|
2671
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Box, { color: "gray.400", children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuChevronUp, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuChevronDown, { size: 16 }) })
|
|
2672
2727
|
] })
|
|
2673
2728
|
]
|
|
2674
2729
|
}
|
|
2675
2730
|
),
|
|
2676
|
-
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2731
|
+
isOpen && children && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Box, { p: 4, borderTopWidth: 1, borderColor: "gray.100", children })
|
|
2677
2732
|
]
|
|
2678
2733
|
}
|
|
2679
2734
|
);
|
|
@@ -2697,14 +2752,20 @@ var modeLabel = (mode) => {
|
|
|
2697
2752
|
return mode || "-";
|
|
2698
2753
|
}
|
|
2699
2754
|
};
|
|
2755
|
+
var display = (value) => {
|
|
2756
|
+
if (value === void 0 || value === null) return void 0;
|
|
2757
|
+
if (typeof value === "number") return value > 0 ? String(value) : void 0;
|
|
2758
|
+
return value.trim() !== "" ? value : void 0;
|
|
2759
|
+
};
|
|
2760
|
+
var classLabel = (beneficiaryClass) => beneficiaryClass === "contingent" ? "Contingent" : "Principal";
|
|
2700
2761
|
var ApplicationAccordion = ({
|
|
2701
2762
|
items,
|
|
2702
2763
|
onEdit
|
|
2703
2764
|
}) => {
|
|
2704
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.VStack, { align: "stretch", gap: 3, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2705
2766
|
InfoCardAccordion,
|
|
2706
2767
|
{
|
|
2707
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2768
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: item.icon, boxSize: "18px" }),
|
|
2708
2769
|
title: item.label,
|
|
2709
2770
|
...item.subtitle !== void 0 ? { subtitle: item.subtitle } : {},
|
|
2710
2771
|
defaultOpen: index === 0,
|
|
@@ -2716,13 +2777,13 @@ var ApplicationAccordion = ({
|
|
|
2716
2777
|
};
|
|
2717
2778
|
var ReviewRows2 = ({
|
|
2718
2779
|
rows
|
|
2719
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2780
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.VStack, { align: "stretch", gap: 1, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RowItem, { label: row.label, value: row.value }, row.label)) });
|
|
2720
2781
|
var FieldGrid = ({
|
|
2721
2782
|
rows
|
|
2722
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2723
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2783
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.SimpleGrid, { columns: { base: 1, sm: 2 }, columnGap: 6, rowGap: 5, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Box, { minW: 0, children: [
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { fontSize: "xs", color: "gray.500", mb: 1, children: row.label }),
|
|
2724
2785
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2725
|
-
|
|
2786
|
+
import_react23.Text,
|
|
2726
2787
|
{
|
|
2727
2788
|
fontSize: "sm",
|
|
2728
2789
|
fontWeight: "600",
|
|
@@ -2737,7 +2798,7 @@ var SectionCard = ({
|
|
|
2737
2798
|
onEdit,
|
|
2738
2799
|
children
|
|
2739
2800
|
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2740
|
-
|
|
2801
|
+
import_react23.Box,
|
|
2741
2802
|
{
|
|
2742
2803
|
css: { breakInside: "avoid" },
|
|
2743
2804
|
mb: 6,
|
|
@@ -2748,10 +2809,10 @@ var SectionCard = ({
|
|
|
2748
2809
|
boxShadow: "sm",
|
|
2749
2810
|
p: 6,
|
|
2750
2811
|
children: [
|
|
2751
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2752
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Flex, { justify: "space-between", align: "center", mb: 5, children: [
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Heading, { as: "h3", fontSize: "lg", fontWeight: "bold", color: "gray.900", children: title }),
|
|
2753
2814
|
onEdit ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2754
|
-
|
|
2815
|
+
import_react23.IconButton,
|
|
2755
2816
|
{
|
|
2756
2817
|
"aria-label": `Edit ${title}`,
|
|
2757
2818
|
size: "sm",
|
|
@@ -2768,23 +2829,18 @@ var SectionCard = ({
|
|
|
2768
2829
|
}
|
|
2769
2830
|
);
|
|
2770
2831
|
var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
2771
|
-
const [cartItems, setCartItems] = (0,
|
|
2772
|
-
const
|
|
2773
|
-
const [openDialog, setOpenDialog] = (0,
|
|
2774
|
-
const [pendingCheck, setPendingCheck] = (0,
|
|
2775
|
-
const [acceptedAgreements, setAcceptedAgreements] = (0,
|
|
2832
|
+
const [cartItems, setCartItems] = (0, import_react24.useState)(null);
|
|
2833
|
+
const lifePlanApplication = useApplicationData();
|
|
2834
|
+
const [openDialog, setOpenDialog] = (0, import_react24.useState)(false);
|
|
2835
|
+
const [pendingCheck, setPendingCheck] = (0, import_react24.useState)(null);
|
|
2836
|
+
const [acceptedAgreements, setAcceptedAgreements] = (0, import_react24.useState)(
|
|
2776
2837
|
() => checkboxList.map(() => false)
|
|
2777
2838
|
);
|
|
2778
|
-
(0,
|
|
2839
|
+
(0, import_react24.useEffect)(() => {
|
|
2779
2840
|
const loadStoredData = () => {
|
|
2780
2841
|
try {
|
|
2781
2842
|
const checkoutStored = sessionStorage.getItem("CheckoutCart");
|
|
2782
2843
|
const cartStored = sessionStorage.getItem("Cart");
|
|
2783
|
-
const lifePlanApplicationStored = localStorage.getItem(
|
|
2784
|
-
"LifePlanApplication"
|
|
2785
|
-
);
|
|
2786
|
-
const parsedApplicationData = lifePlanApplicationStored ? JSON.parse(lifePlanApplicationStored) : null;
|
|
2787
|
-
setLifePlanApplication(parsedApplicationData);
|
|
2788
2844
|
if (checkoutStored) {
|
|
2789
2845
|
const parsedCheckout = JSON.parse(checkoutStored);
|
|
2790
2846
|
setCartItems(
|
|
@@ -2810,23 +2866,18 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2810
2866
|
const acceptedCount = acceptedAgreements.filter(Boolean).length;
|
|
2811
2867
|
const allAccepted = checkboxList.length > 0 && acceptedCount === checkboxList.length;
|
|
2812
2868
|
const pendingAgreement = pendingCheck !== null ? checkboxList[pendingCheck] : null;
|
|
2813
|
-
(0,
|
|
2869
|
+
(0, import_react24.useEffect)(() => {
|
|
2814
2870
|
onAllAcceptedChange?.(allAccepted);
|
|
2815
2871
|
}, [allAccepted, onAllAcceptedChange]);
|
|
2816
|
-
const beneficiaries = [
|
|
2817
|
-
{
|
|
2818
|
-
name: "
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
relationship: "Relative",
|
|
2826
|
-
dob: "1992-04-15",
|
|
2827
|
-
address: "Sample Avenue, Sample District, Sample City"
|
|
2828
|
-
}
|
|
2829
|
-
];
|
|
2872
|
+
const beneficiaries = (lifePlanApplication?.beneficiaries ?? []).map(
|
|
2873
|
+
(beneficiary) => ({
|
|
2874
|
+
name: [beneficiary.firstName, beneficiary.middleInitial, beneficiary.lastName].map((part) => part?.trim()).filter(Boolean).join(" "),
|
|
2875
|
+
beneficiaryClass: classLabel(beneficiary.beneficiaryClass),
|
|
2876
|
+
relationship: beneficiary.relationship,
|
|
2877
|
+
dob: beneficiary.birthDate,
|
|
2878
|
+
address: beneficiary.address
|
|
2879
|
+
})
|
|
2880
|
+
);
|
|
2830
2881
|
const confirmAgreement = () => {
|
|
2831
2882
|
if (pendingCheck === null) return;
|
|
2832
2883
|
setAcceptedAgreements((prev) => {
|
|
@@ -2845,83 +2896,62 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2845
2896
|
value: selectedPlan ? `\u20B1 ${selectedPlan.total}` : void 0
|
|
2846
2897
|
}
|
|
2847
2898
|
];
|
|
2899
|
+
const personal = lifePlanApplication?.personalInfo;
|
|
2900
|
+
const address = lifePlanApplication?.address;
|
|
2901
|
+
const employment = lifePlanApplication?.employment;
|
|
2848
2902
|
const personalRows = [
|
|
2849
|
-
{ label: "Uploaded ID", value:
|
|
2850
|
-
{ label: "
|
|
2851
|
-
{ label: "
|
|
2852
|
-
{
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
},
|
|
2856
|
-
{ label: "
|
|
2857
|
-
{
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
},
|
|
2861
|
-
{ label: "
|
|
2862
|
-
{
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
},
|
|
2866
|
-
{ label: "Email", value: lifePlanApplication?.personalInfo.emailAddress },
|
|
2867
|
-
{
|
|
2868
|
-
label: "Landline Number",
|
|
2869
|
-
value: lifePlanApplication?.personalInfo.landLineNumber
|
|
2870
|
-
},
|
|
2871
|
-
{
|
|
2872
|
-
label: "Mailing Address",
|
|
2873
|
-
value: lifePlanApplication?.personalInfo.mailingAddress
|
|
2874
|
-
},
|
|
2875
|
-
{
|
|
2876
|
-
label: "Civil Status",
|
|
2877
|
-
value: lifePlanApplication?.personalInfo.civilStatus
|
|
2878
|
-
}
|
|
2903
|
+
{ label: "Uploaded ID", value: display(personal?.idType) },
|
|
2904
|
+
{ label: "ID Number", value: display(personal?.idNumber) },
|
|
2905
|
+
{ label: "Last Name", value: display(personal?.lastName) },
|
|
2906
|
+
{ label: "First Name", value: display(personal?.firstName) },
|
|
2907
|
+
{ label: "Middle Name", value: display(personal?.middleName) },
|
|
2908
|
+
{ label: "Suffix", value: display(personal?.suffix) },
|
|
2909
|
+
{ label: "Date of Birth", value: display(personal?.birthDate) },
|
|
2910
|
+
{ label: "Gender", value: display(personal?.gender) },
|
|
2911
|
+
{ label: "Civil Status", value: display(personal?.civilStatus) },
|
|
2912
|
+
{ label: "Nationality", value: display(personal?.nationality) },
|
|
2913
|
+
{ label: "Height", value: display(personal?.height) },
|
|
2914
|
+
{ label: "Weight", value: display(personal?.weight) },
|
|
2915
|
+
{ label: "Contact Number", value: display(personal?.mobileNumber) },
|
|
2916
|
+
{ label: "Email", value: display(personal?.emailAddress) },
|
|
2917
|
+
{ label: "Landline Number", value: display(personal?.landLineNumber) },
|
|
2918
|
+
{ label: "Mailing Address", value: display(personal?.mailingAddress) }
|
|
2879
2919
|
];
|
|
2880
2920
|
const addressRows = [
|
|
2881
|
-
{ label: "Lot #", value:
|
|
2882
|
-
{ label: "Street", value:
|
|
2883
|
-
{ label: "Barangay", value:
|
|
2884
|
-
{ label: "
|
|
2885
|
-
{ label: "
|
|
2921
|
+
{ label: "Lot #", value: display(address?.lot) },
|
|
2922
|
+
{ label: "Street", value: display(address?.street) },
|
|
2923
|
+
{ label: "Barangay", value: display(address?.barangay) },
|
|
2924
|
+
{ label: "District", value: display(address?.district) },
|
|
2925
|
+
{ label: "City", value: display(address?.city) },
|
|
2926
|
+
{ label: "Province", value: display(address?.province) }
|
|
2886
2927
|
];
|
|
2887
2928
|
const employmentRows = [
|
|
2888
|
-
{ label: "Occupation", value:
|
|
2889
|
-
{
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
},
|
|
2893
|
-
{
|
|
2894
|
-
|
|
2895
|
-
value: lifePlanApplication?.employment.employmentStatus
|
|
2896
|
-
},
|
|
2897
|
-
{
|
|
2898
|
-
label: "Office Address",
|
|
2899
|
-
value: lifePlanApplication?.employment.officeAddress
|
|
2900
|
-
},
|
|
2901
|
-
{ label: "TIN", value: lifePlanApplication?.employment.TIN },
|
|
2902
|
-
{ label: "SSS/GSIS", value: lifePlanApplication?.employment.SSS },
|
|
2903
|
-
{
|
|
2904
|
-
label: "Source of Income",
|
|
2905
|
-
value: lifePlanApplication?.employment.sourceOfIncome
|
|
2906
|
-
}
|
|
2929
|
+
{ label: "Occupation", value: display(employment?.occupation) },
|
|
2930
|
+
{ label: "Employer Name", value: display(employment?.employerName) },
|
|
2931
|
+
{ label: "Employment Status", value: display(employment?.employmentStatus) },
|
|
2932
|
+
{ label: "Office Address", value: display(employment?.officeAddress) },
|
|
2933
|
+
{ label: "TIN", value: display(employment?.TIN) },
|
|
2934
|
+
{ label: "SSS/GSIS", value: display(employment?.SSS) },
|
|
2935
|
+
{ label: "Source of Income", value: display(employment?.sourceOfIncome) }
|
|
2907
2936
|
];
|
|
2908
|
-
const beneficiaryItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2909
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2937
|
+
const beneficiaryItems = beneficiaries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { fontSize: "sm", color: "gray.500", children: "No beneficiaries added." }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.VStack, { align: "stretch", gap: 4, children: beneficiaries.map((beneficiary, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Box, { children: [
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { fontWeight: "semibold", fontSize: "sm", mb: 1, children: display(beneficiary.name) ?? "-" }),
|
|
2910
2939
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2911
2940
|
ReviewRows2,
|
|
2912
2941
|
{
|
|
2913
2942
|
rows: [
|
|
2914
|
-
{ label: "
|
|
2915
|
-
{ label: "
|
|
2916
|
-
{ label: "
|
|
2943
|
+
{ label: "Type", value: beneficiary.beneficiaryClass },
|
|
2944
|
+
{ label: "Relationship", value: display(beneficiary.relationship) },
|
|
2945
|
+
{ label: "Date of Birth", value: display(beneficiary.dob) },
|
|
2946
|
+
{ label: "Address", value: display(beneficiary.address) }
|
|
2917
2947
|
]
|
|
2918
2948
|
}
|
|
2919
2949
|
)
|
|
2920
2950
|
] }, `${beneficiary.name}-${index}`)) });
|
|
2921
|
-
const agreementItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2951
|
+
const agreementItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.VStack, { align: "stretch", gap: 3, children: checkboxList.map((item, index) => {
|
|
2922
2952
|
const isAccepted = acceptedAgreements[index];
|
|
2923
2953
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2924
|
-
|
|
2954
|
+
import_react23.Box,
|
|
2925
2955
|
{
|
|
2926
2956
|
role: "button",
|
|
2927
2957
|
tabIndex: 0,
|
|
@@ -2942,16 +2972,16 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2942
2972
|
setOpenDialog(true);
|
|
2943
2973
|
}
|
|
2944
2974
|
},
|
|
2945
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2946
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2947
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Flex, { justify: "space-between", align: "start", gap: 4, children: [
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Box, { flex: "1", minW: 0, children: [
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Text, { fontWeight: "semibold", lineClamp: 2, children: [
|
|
2948
2978
|
item.checkBoxTitle,
|
|
2949
2979
|
"."
|
|
2950
2980
|
] }),
|
|
2951
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { fontSize: "sm", color: "gray.600", mt: 1, lineClamp: 1, children: "Tap to review details." })
|
|
2952
2982
|
] }),
|
|
2953
2983
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2954
|
-
|
|
2984
|
+
import_react23.Badge,
|
|
2955
2985
|
{
|
|
2956
2986
|
variant: "subtle",
|
|
2957
2987
|
colorPalette: isAccepted ? "green" : "gray",
|
|
@@ -2963,12 +2993,12 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2963
2993
|
index
|
|
2964
2994
|
);
|
|
2965
2995
|
}) });
|
|
2966
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2967
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Box, { minH: "100vh", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Box, { px: { base: 0, md: 8 }, pb: { base: 4, md: 8 }, children: [
|
|
2997
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Box, { display: { base: "block", lg: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.VStack, { align: "stretch", gap: 3, children: [
|
|
2968
2998
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2969
2999
|
InfoCardAccordion,
|
|
2970
3000
|
{
|
|
2971
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3001
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
2972
3002
|
title: "Order Summary",
|
|
2973
3003
|
subtitle: modeLabel(selectedPlan?.mode),
|
|
2974
3004
|
defaultOpen: true,
|
|
@@ -3008,7 +3038,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3008
3038
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3009
3039
|
InfoCardAccordion,
|
|
3010
3040
|
{
|
|
3011
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3041
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_fa3.FaRegUser, boxSize: "18px" }),
|
|
3012
3042
|
title: "Beneficiaries",
|
|
3013
3043
|
subtitle: `${beneficiaries.length} listed`,
|
|
3014
3044
|
children: beneficiaryItems
|
|
@@ -3017,7 +3047,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3017
3047
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3018
3048
|
InfoCardAccordion,
|
|
3019
3049
|
{
|
|
3020
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3050
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
3021
3051
|
title: "Agreements",
|
|
3022
3052
|
subtitle: `${acceptedCount}/${checkboxList.length} accepted`,
|
|
3023
3053
|
children: agreementItems
|
|
@@ -3025,7 +3055,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3025
3055
|
)
|
|
3026
3056
|
] }) }),
|
|
3027
3057
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3028
|
-
|
|
3058
|
+
import_react23.Box,
|
|
3029
3059
|
{
|
|
3030
3060
|
display: { base: "none", lg: "block" },
|
|
3031
3061
|
css: { columnCount: 2, columnGap: "24px" },
|
|
@@ -3043,7 +3073,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3043
3073
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Employment", onEdit: () => onEdit?.("employment"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: employmentRows }) }),
|
|
3044
3074
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Beneficiaries", children: beneficiaryItems }),
|
|
3045
3075
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(SectionCard, { title: "Agreements", children: [
|
|
3046
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3076
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Text, { fontSize: "xs", color: "gray.500", mb: 4, children: [
|
|
3047
3077
|
acceptedCount,
|
|
3048
3078
|
"/",
|
|
3049
3079
|
checkboxList.length,
|
|
@@ -3055,29 +3085,29 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3055
3085
|
}
|
|
3056
3086
|
),
|
|
3057
3087
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3058
|
-
|
|
3088
|
+
import_react23.Dialog.Root,
|
|
3059
3089
|
{
|
|
3060
3090
|
open: openDialog,
|
|
3061
3091
|
onOpenChange: (details) => setOpenDialog(details.open),
|
|
3062
3092
|
size: { mdDown: "full", md: "xl" },
|
|
3063
3093
|
scrollBehavior: "inside",
|
|
3064
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3065
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3066
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3067
|
-
|
|
3094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Portal, { children: [
|
|
3095
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Dialog.Backdrop, { backdropFilter: "blur(6px)" }),
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3097
|
+
import_react23.Dialog.Content,
|
|
3068
3098
|
{
|
|
3069
3099
|
bg: "white",
|
|
3070
3100
|
rounded: "xl",
|
|
3071
3101
|
shadow: "lg",
|
|
3072
3102
|
overflow: "hidden",
|
|
3073
3103
|
children: [
|
|
3074
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3075
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3104
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.CloseButton, { position: "absolute", top: 3, right: 3 }) }),
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Dialog.Header, { px: { base: 4, md: 6 }, pt: { base: 5, md: 6 }, children: [
|
|
3076
3106
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_st_peter_ui6.H3, { children: pendingCheck !== null ? pendingAgreement?.title || "Agreement" : "Agreement" }),
|
|
3077
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { fontSize: "sm", color: "gray.600", mt: 2, children: "Please read carefully. Confirm to accept this agreement." })
|
|
3078
3108
|
] }),
|
|
3079
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3080
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Dialog.Body, { px: { base: 4, md: 6 }, pb: { base: 5, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Box, { p: 4, borderWidth: "0px", rounded: "lg", bg: "gray.50", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Text, { whiteSpace: "pre-wrap", fontSize: "sm", color: "gray.800", children: pendingCheck !== null ? pendingAgreement?.description || "Please review and confirm before proceeding." : "Please review and confirm before proceeding." }) }) }),
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Dialog.Footer, { px: { base: 4, md: 6 }, pb: { base: 5, md: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.HStack, { justify: "flex-end", gap: 3, w: "full", children: [
|
|
3081
3111
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3082
3112
|
import_st_peter_ui6.CancelButton,
|
|
3083
3113
|
{
|
|
@@ -3166,8 +3196,8 @@ var createLifePlanSteps = (confirmationProps) => [
|
|
|
3166
3196
|
];
|
|
3167
3197
|
|
|
3168
3198
|
// src/NewSaleForm/ui/horizontal-stepper.tsx
|
|
3169
|
-
var
|
|
3170
|
-
var
|
|
3199
|
+
var import_react25 = require("react");
|
|
3200
|
+
var import_react26 = require("@chakra-ui/react");
|
|
3171
3201
|
var import_st_peter_ui7 = require("st-peter-ui");
|
|
3172
3202
|
var import_lu5 = require("react-icons/lu");
|
|
3173
3203
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
@@ -3185,9 +3215,9 @@ var HorizontalStepper = ({
|
|
|
3185
3215
|
nextDisabled,
|
|
3186
3216
|
submitButtonText = "Proceed To Payment"
|
|
3187
3217
|
}) => {
|
|
3188
|
-
const [localActiveStep, setLocalActiveStep] = (0,
|
|
3218
|
+
const [localActiveStep, setLocalActiveStep] = (0, import_react25.useState)(0);
|
|
3189
3219
|
const activeStep = controlledActiveStep !== void 0 ? controlledActiveStep : localActiveStep;
|
|
3190
|
-
const formTopRef = (0,
|
|
3220
|
+
const formTopRef = (0, import_react25.useRef)(null);
|
|
3191
3221
|
const isCompact = steps.length < 3;
|
|
3192
3222
|
const isLastStep = activeStep === steps.length - 1;
|
|
3193
3223
|
const nextStepTitle = steps[activeStep + 1]?.title;
|
|
@@ -3211,7 +3241,7 @@ var HorizontalStepper = ({
|
|
|
3211
3241
|
handleStepChange(Math.min(activeStep + 1, steps.length - 1));
|
|
3212
3242
|
};
|
|
3213
3243
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3214
|
-
|
|
3244
|
+
import_react26.Flex,
|
|
3215
3245
|
{
|
|
3216
3246
|
direction: "column",
|
|
3217
3247
|
align: "start",
|
|
@@ -3220,10 +3250,10 @@ var HorizontalStepper = ({
|
|
|
3220
3250
|
overflow: "visible",
|
|
3221
3251
|
pb: { base: "12px", md: "0px" },
|
|
3222
3252
|
children: [
|
|
3223
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3224
|
-
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3253
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Box, { ref: formTopRef, h: "0", w: "full", scrollMarginTop: { base: 4, md: 6 } }),
|
|
3254
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react26.Box, { mb: 4, children: [
|
|
3225
3255
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3226
|
-
|
|
3256
|
+
import_react26.Box,
|
|
3227
3257
|
{
|
|
3228
3258
|
as: "h1",
|
|
3229
3259
|
m: "0",
|
|
@@ -3239,10 +3269,10 @@ var HorizontalStepper = ({
|
|
|
3239
3269
|
children: title
|
|
3240
3270
|
}
|
|
3241
3271
|
),
|
|
3242
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3272
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Text, { fontSize: "sm", color: "gray.500", mt: 1, children: description })
|
|
3243
3273
|
] }),
|
|
3244
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3245
|
-
|
|
3274
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Box, { w: "full", rounded: "2xl", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3275
|
+
import_react26.Steps.Root,
|
|
3246
3276
|
{
|
|
3247
3277
|
step: activeStep,
|
|
3248
3278
|
onStepChange: (index) => handleStepChange(index.step),
|
|
@@ -3251,7 +3281,7 @@ var HorizontalStepper = ({
|
|
|
3251
3281
|
colorPalette: "green",
|
|
3252
3282
|
children: [
|
|
3253
3283
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3254
|
-
|
|
3284
|
+
import_react26.Box,
|
|
3255
3285
|
{
|
|
3256
3286
|
position: "sticky",
|
|
3257
3287
|
top: 0,
|
|
@@ -3266,7 +3296,7 @@ var HorizontalStepper = ({
|
|
|
3266
3296
|
boxShadow: "0 2px 8px -2px rgba(0,0,0,0.06)",
|
|
3267
3297
|
children: [
|
|
3268
3298
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3269
|
-
|
|
3299
|
+
import_react26.Steps.List,
|
|
3270
3300
|
{
|
|
3271
3301
|
py: 0,
|
|
3272
3302
|
flexDirection: "row",
|
|
@@ -3277,7 +3307,7 @@ var HorizontalStepper = ({
|
|
|
3277
3307
|
const isCompleted = index < activeStep;
|
|
3278
3308
|
const isActive = index === activeStep;
|
|
3279
3309
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3280
|
-
|
|
3310
|
+
import_react26.Steps.Item,
|
|
3281
3311
|
{
|
|
3282
3312
|
index,
|
|
3283
3313
|
title: step.title,
|
|
@@ -3285,7 +3315,7 @@ var HorizontalStepper = ({
|
|
|
3285
3315
|
flex: isCompact ? "0 0 auto" : "1",
|
|
3286
3316
|
children: [
|
|
3287
3317
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3288
|
-
|
|
3318
|
+
import_react26.Steps.Trigger,
|
|
3289
3319
|
{
|
|
3290
3320
|
flexDirection: isCompact ? "row" : "column",
|
|
3291
3321
|
alignItems: "center",
|
|
@@ -3297,7 +3327,7 @@ var HorizontalStepper = ({
|
|
|
3297
3327
|
_hover: { bg: "gray.50" },
|
|
3298
3328
|
children: [
|
|
3299
3329
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3300
|
-
|
|
3330
|
+
import_react26.Steps.Indicator,
|
|
3301
3331
|
{
|
|
3302
3332
|
borderWidth: "2px",
|
|
3303
3333
|
transition: "all 0.25s",
|
|
@@ -3307,11 +3337,11 @@ var HorizontalStepper = ({
|
|
|
3307
3337
|
color: isCompleted ? "white" : isActive ? PRIMARY : void 0,
|
|
3308
3338
|
boxShadow: isActive ? `0 0 0 3px ${PRIMARY_DISABLED}` : "none"
|
|
3309
3339
|
},
|
|
3310
|
-
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuCheck, { size: 14 }) : step.icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3340
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuCheck, { size: 14 }) : step.icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Box, { as: step.icon, w: 4, h: 4 }) : null
|
|
3311
3341
|
}
|
|
3312
3342
|
),
|
|
3313
3343
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3314
|
-
|
|
3344
|
+
import_react26.Steps.Title,
|
|
3315
3345
|
{
|
|
3316
3346
|
fontSize: { base: "xs", md: "sm" },
|
|
3317
3347
|
textAlign: isCompact ? "left" : "center",
|
|
@@ -3327,7 +3357,7 @@ var HorizontalStepper = ({
|
|
|
3327
3357
|
}
|
|
3328
3358
|
),
|
|
3329
3359
|
!isCompact && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3330
|
-
|
|
3360
|
+
import_react26.Steps.Separator,
|
|
3331
3361
|
{
|
|
3332
3362
|
display: { base: "none", md: "block" }
|
|
3333
3363
|
}
|
|
@@ -3340,7 +3370,7 @@ var HorizontalStepper = ({
|
|
|
3340
3370
|
}
|
|
3341
3371
|
),
|
|
3342
3372
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3343
|
-
|
|
3373
|
+
import_react26.Box,
|
|
3344
3374
|
{
|
|
3345
3375
|
w: "full",
|
|
3346
3376
|
h: "3px",
|
|
@@ -3349,7 +3379,7 @@ var HorizontalStepper = ({
|
|
|
3349
3379
|
overflow: "hidden",
|
|
3350
3380
|
mt: 1,
|
|
3351
3381
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3352
|
-
|
|
3382
|
+
import_react26.Box,
|
|
3353
3383
|
{
|
|
3354
3384
|
h: "full",
|
|
3355
3385
|
bg: PRIMARY,
|
|
@@ -3362,9 +3392,9 @@ var HorizontalStepper = ({
|
|
|
3362
3392
|
]
|
|
3363
3393
|
}
|
|
3364
3394
|
),
|
|
3365
|
-
steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3395
|
+
steps.map((step, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Steps.Content, { index, children: step.component ?? step.description }, index)),
|
|
3366
3396
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3367
|
-
|
|
3397
|
+
import_react26.Flex,
|
|
3368
3398
|
{
|
|
3369
3399
|
w: "full",
|
|
3370
3400
|
justify: "space-between",
|
|
@@ -3373,8 +3403,8 @@ var HorizontalStepper = ({
|
|
|
3373
3403
|
gap: 2,
|
|
3374
3404
|
display: { base: "flex", md: "none" },
|
|
3375
3405
|
children: [
|
|
3376
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3377
|
-
|
|
3406
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Steps.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3407
|
+
import_react26.Box,
|
|
3378
3408
|
{
|
|
3379
3409
|
as: "button",
|
|
3380
3410
|
display: "flex",
|
|
@@ -3400,7 +3430,7 @@ var HorizontalStepper = ({
|
|
|
3400
3430
|
}
|
|
3401
3431
|
) }),
|
|
3402
3432
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3403
|
-
|
|
3433
|
+
import_react26.Box,
|
|
3404
3434
|
{
|
|
3405
3435
|
as: "button",
|
|
3406
3436
|
display: "flex",
|
|
@@ -3425,7 +3455,7 @@ var HorizontalStepper = ({
|
|
|
3425
3455
|
]
|
|
3426
3456
|
}
|
|
3427
3457
|
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3428
|
-
|
|
3458
|
+
import_react26.Box,
|
|
3429
3459
|
{
|
|
3430
3460
|
as: "button",
|
|
3431
3461
|
display: "flex",
|
|
@@ -3454,18 +3484,18 @@ var HorizontalStepper = ({
|
|
|
3454
3484
|
}
|
|
3455
3485
|
),
|
|
3456
3486
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3457
|
-
|
|
3487
|
+
import_react26.ButtonGroup,
|
|
3458
3488
|
{
|
|
3459
3489
|
size: "sm",
|
|
3460
3490
|
variant: "outline",
|
|
3461
3491
|
display: { base: "none", md: "flex" },
|
|
3462
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3463
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react26.Flex, { mt: 5, w: "full", align: "center", justify: "space-between", children: [
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Steps.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_st_peter_ui7.SecondaryMdButton, { children: [
|
|
3464
3494
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuChevronLeft, {}),
|
|
3465
3495
|
"Previous"
|
|
3466
3496
|
] }) }),
|
|
3467
3497
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3468
|
-
|
|
3498
|
+
import_react26.Box,
|
|
3469
3499
|
{
|
|
3470
3500
|
as: "button",
|
|
3471
3501
|
display: "flex",
|
|
@@ -3643,12 +3673,12 @@ var SharedLifePlanApplication = ({
|
|
|
3643
3673
|
onCheckout = defaultCheckout,
|
|
3644
3674
|
parseAddress = GeoApifyService.parseAddress
|
|
3645
3675
|
}) => {
|
|
3646
|
-
const [currentStep, setCurrentStep] = (0,
|
|
3647
|
-
const [loading, setLoading] = (0,
|
|
3648
|
-
const [allAgreementsAccepted, setAllAgreementsAccepted] = (0,
|
|
3649
|
-
const [applicationSection, setApplicationSection] = (0,
|
|
3650
|
-
const [applicationSectionKey, setApplicationSectionKey] = (0,
|
|
3651
|
-
const [applicationValid, setApplicationValid] = (0,
|
|
3676
|
+
const [currentStep, setCurrentStep] = (0, import_react28.useState)(0);
|
|
3677
|
+
const [loading, setLoading] = (0, import_react28.useState)(false);
|
|
3678
|
+
const [allAgreementsAccepted, setAllAgreementsAccepted] = (0, import_react28.useState)(false);
|
|
3679
|
+
const [applicationSection, setApplicationSection] = (0, import_react28.useState)();
|
|
3680
|
+
const [applicationSectionKey, setApplicationSectionKey] = (0, import_react28.useState)(0);
|
|
3681
|
+
const [applicationValid, setApplicationValid] = (0, import_react28.useState)(false);
|
|
3652
3682
|
const steps = createLifePlanSteps({
|
|
3653
3683
|
onAllAcceptedChange: setAllAgreementsAccepted,
|
|
3654
3684
|
...applicationSection ? { applicationSection } : {},
|
|
@@ -3673,7 +3703,7 @@ var SharedLifePlanApplication = ({
|
|
|
3673
3703
|
if (items.length === 0) {
|
|
3674
3704
|
throw new Error("No items to checkout");
|
|
3675
3705
|
}
|
|
3676
|
-
const applicationData =
|
|
3706
|
+
const applicationData = loadApplicationData() ?? createEmptyApplicationData();
|
|
3677
3707
|
const checkoutPayload = items.map((item) => ({
|
|
3678
3708
|
planDesc: item.planDesc,
|
|
3679
3709
|
mode: item.mode,
|
|
@@ -3695,7 +3725,7 @@ var SharedLifePlanApplication = ({
|
|
|
3695
3725
|
setLoading(false);
|
|
3696
3726
|
}
|
|
3697
3727
|
};
|
|
3698
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react27.Box, { w: "full", overflowX: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3699
3729
|
horizontal_stepper_default,
|
|
3700
3730
|
{
|
|
3701
3731
|
steps,
|
|
@@ -3717,12 +3747,12 @@ var LifePlanApplicationStepWrapper = (props) => {
|
|
|
3717
3747
|
var LifePlanApplicationStepWrapper_default = LifePlanApplicationStepWrapper;
|
|
3718
3748
|
|
|
3719
3749
|
// src/hooks/useOcr.ts
|
|
3720
|
-
var
|
|
3750
|
+
var import_react29 = require("react");
|
|
3721
3751
|
function useOcr(scanIdFn) {
|
|
3722
|
-
const [data, setData] = (0,
|
|
3723
|
-
const [loading, setLoading] = (0,
|
|
3724
|
-
const [error, setError] = (0,
|
|
3725
|
-
const scanId = (0,
|
|
3752
|
+
const [data, setData] = (0, import_react29.useState)(null);
|
|
3753
|
+
const [loading, setLoading] = (0, import_react29.useState)(false);
|
|
3754
|
+
const [error, setError] = (0, import_react29.useState)(null);
|
|
3755
|
+
const scanId = (0, import_react29.useCallback)(
|
|
3726
3756
|
async (file) => {
|
|
3727
3757
|
setLoading(true);
|
|
3728
3758
|
setError(null);
|
|
@@ -3746,17 +3776,17 @@ function useOcr(scanIdFn) {
|
|
|
3746
3776
|
|
|
3747
3777
|
// src/GetStarted/GetStarted.tsx
|
|
3748
3778
|
var import_st_peter_ui8 = require("st-peter-ui");
|
|
3749
|
-
var
|
|
3750
|
-
var
|
|
3779
|
+
var import_react34 = require("@chakra-ui/react");
|
|
3780
|
+
var import_react35 = require("react");
|
|
3751
3781
|
var import_lu7 = require("react-icons/lu");
|
|
3752
3782
|
|
|
3753
3783
|
// src/GetStarted/Container.tsx
|
|
3754
|
-
var
|
|
3755
|
-
var
|
|
3784
|
+
var import_react30 = require("react");
|
|
3785
|
+
var import_react31 = require("@chakra-ui/react");
|
|
3756
3786
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3757
3787
|
var Container = ({ children }) => {
|
|
3758
3788
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3759
|
-
|
|
3789
|
+
import_react31.Box,
|
|
3760
3790
|
{
|
|
3761
3791
|
px: { base: 8, md: 8 },
|
|
3762
3792
|
mt: { base: 16, md: 32 },
|
|
@@ -3770,8 +3800,8 @@ var Container = ({ children }) => {
|
|
|
3770
3800
|
var Container_default = Container;
|
|
3771
3801
|
|
|
3772
3802
|
// src/GetStarted/DocumentUploadCard.tsx
|
|
3773
|
-
var
|
|
3774
|
-
var
|
|
3803
|
+
var import_react32 = require("react");
|
|
3804
|
+
var import_react33 = require("@chakra-ui/react");
|
|
3775
3805
|
var import_lu6 = require("react-icons/lu");
|
|
3776
3806
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3777
3807
|
var PRIMARY2 = "var(--chakra-colors-primary)";
|
|
@@ -3798,9 +3828,9 @@ var validate = (file, config) => {
|
|
|
3798
3828
|
return null;
|
|
3799
3829
|
};
|
|
3800
3830
|
var useDocumentSlot = (config, onProcess, notifyError = defaultNotifyError) => {
|
|
3801
|
-
const [slot, setSlot] = (0,
|
|
3802
|
-
const timers = (0,
|
|
3803
|
-
const runId = (0,
|
|
3831
|
+
const [slot, setSlot] = (0, import_react32.useState)({ status: "idle" });
|
|
3832
|
+
const timers = (0, import_react32.useRef)([]);
|
|
3833
|
+
const runId = (0, import_react32.useRef)(0);
|
|
3804
3834
|
const clearTimers = () => {
|
|
3805
3835
|
timers.current.forEach(clearTimeout);
|
|
3806
3836
|
timers.current = [];
|
|
@@ -3883,7 +3913,7 @@ var Card = ({
|
|
|
3883
3913
|
headerAction,
|
|
3884
3914
|
children
|
|
3885
3915
|
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3886
|
-
|
|
3916
|
+
import_react33.Box,
|
|
3887
3917
|
{
|
|
3888
3918
|
w: "full",
|
|
3889
3919
|
borderRadius: "2xl",
|
|
@@ -3893,10 +3923,10 @@ var Card = ({
|
|
|
3893
3923
|
shadow: "sm",
|
|
3894
3924
|
overflow: "hidden",
|
|
3895
3925
|
children: [
|
|
3896
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3897
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "center", justify: "space-between", px: 4, py: 3, gap: 2, children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "center", gap: 2, minW: 0, children: [
|
|
3898
3928
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3899
|
-
|
|
3929
|
+
import_react33.Box,
|
|
3900
3930
|
{
|
|
3901
3931
|
p: 2,
|
|
3902
3932
|
borderRadius: "full",
|
|
@@ -3906,14 +3936,14 @@ var Card = ({
|
|
|
3906
3936
|
children: activeIcon
|
|
3907
3937
|
}
|
|
3908
3938
|
),
|
|
3909
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3910
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3911
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { minW: 0, children: [
|
|
3940
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontWeight: "bold", fontSize: "md", lineHeight: "1.2", truncate: true, children: title }),
|
|
3941
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "xs", color: "gray.500", truncate: true, children: subtitle })
|
|
3912
3942
|
] })
|
|
3913
3943
|
] }),
|
|
3914
3944
|
headerAction
|
|
3915
3945
|
] }),
|
|
3916
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Box, { px: 4, pb: 4, pt: 1, borderTopWidth: "1px", borderColor: "gray.100", children })
|
|
3917
3947
|
]
|
|
3918
3948
|
}
|
|
3919
3949
|
);
|
|
@@ -3928,7 +3958,7 @@ var StatusPill = ({ status }) => {
|
|
|
3928
3958
|
const meta = map[status];
|
|
3929
3959
|
if (!meta) return null;
|
|
3930
3960
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3931
|
-
|
|
3961
|
+
import_react33.Flex,
|
|
3932
3962
|
{
|
|
3933
3963
|
align: "center",
|
|
3934
3964
|
gap: 1.5,
|
|
@@ -3940,14 +3970,14 @@ var StatusPill = ({ status }) => {
|
|
|
3940
3970
|
style: { color: meta.fg, background: meta.bg },
|
|
3941
3971
|
flexShrink: 0,
|
|
3942
3972
|
children: [
|
|
3943
|
-
status === "processing" || status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3973
|
+
status === "processing" || status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Spinner, { size: "xs", borderWidth: "2px" }) : status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuCheck, { size: 12 }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuTriangleAlert, { size: 12 }),
|
|
3944
3974
|
meta.label
|
|
3945
3975
|
]
|
|
3946
3976
|
}
|
|
3947
3977
|
);
|
|
3948
3978
|
};
|
|
3949
|
-
var ProgressBar = ({ value, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3950
|
-
|
|
3979
|
+
var ProgressBar = ({ value, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Box, { w: "full", h: "6px", bg: "gray.100", borderRadius: "full", overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3980
|
+
import_react33.Box,
|
|
3951
3981
|
{
|
|
3952
3982
|
h: "full",
|
|
3953
3983
|
borderRadius: "full",
|
|
@@ -3964,7 +3994,7 @@ var Thumb = ({
|
|
|
3964
3994
|
fileName,
|
|
3965
3995
|
transparent
|
|
3966
3996
|
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3967
|
-
|
|
3997
|
+
import_react33.Flex,
|
|
3968
3998
|
{
|
|
3969
3999
|
align: "center",
|
|
3970
4000
|
justify: "center",
|
|
@@ -3980,9 +4010,9 @@ var Thumb = ({
|
|
|
3980
4010
|
backgroundSize: "10px 10px",
|
|
3981
4011
|
backgroundPosition: "0 0,0 5px,5px -5px,-5px 0"
|
|
3982
4012
|
} : void 0,
|
|
3983
|
-
children: isPdf || !url ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4013
|
+
children: isPdf || !url ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { direction: "column", align: "center", color: "gray.400", gap: 0.5, children: [
|
|
3984
4014
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuFileText, { size: 22 }),
|
|
3985
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "9px", fontWeight: 600, children: isPdf ? "PDF" : "FILE" })
|
|
3986
4016
|
] }) : (
|
|
3987
4017
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3988
4018
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -4009,7 +4039,7 @@ var GhostBtn = ({
|
|
|
4009
4039
|
};
|
|
4010
4040
|
const t = tones[tone];
|
|
4011
4041
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4012
|
-
|
|
4042
|
+
import_react33.Flex,
|
|
4013
4043
|
{
|
|
4014
4044
|
as: "button",
|
|
4015
4045
|
align: "center",
|
|
@@ -4043,12 +4073,12 @@ function DocumentUploadCard({
|
|
|
4043
4073
|
const notifyError = onError ?? defaultNotifyError;
|
|
4044
4074
|
const { slot, uploadDocument, retryDocument, removeDocument } = useDocumentSlot(config, onProcess, notifyError);
|
|
4045
4075
|
const status = slot?.status ?? "idle";
|
|
4046
|
-
(0,
|
|
4076
|
+
(0, import_react32.useEffect)(() => {
|
|
4047
4077
|
onStatusChange?.(status);
|
|
4048
4078
|
}, [status, onStatusChange]);
|
|
4049
|
-
const browseRef = (0,
|
|
4050
|
-
const cameraRef = (0,
|
|
4051
|
-
const [dragging, setDragging] = (0,
|
|
4079
|
+
const browseRef = (0, import_react32.useRef)(null);
|
|
4080
|
+
const cameraRef = (0, import_react32.useRef)(null);
|
|
4081
|
+
const [dragging, setDragging] = (0, import_react32.useState)(false);
|
|
4052
4082
|
const Icon6 = config.icon;
|
|
4053
4083
|
const isPdf = slot?.fileType === "application/pdf";
|
|
4054
4084
|
const handleFiles = (files) => {
|
|
@@ -4067,7 +4097,7 @@ function DocumentUploadCard({
|
|
|
4067
4097
|
handleFiles(e.dataTransfer.files);
|
|
4068
4098
|
};
|
|
4069
4099
|
const renderDropzone = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4070
|
-
|
|
4100
|
+
import_react33.Flex,
|
|
4071
4101
|
{
|
|
4072
4102
|
direction: "column",
|
|
4073
4103
|
align: "center",
|
|
@@ -4098,7 +4128,7 @@ function DocumentUploadCard({
|
|
|
4098
4128
|
_hover: { borderColor: PRIMARY2, bg: PRIMARY_SOFT },
|
|
4099
4129
|
children: [
|
|
4100
4130
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4101
|
-
|
|
4131
|
+
import_react33.Flex,
|
|
4102
4132
|
{
|
|
4103
4133
|
align: "center",
|
|
4104
4134
|
justify: "center",
|
|
@@ -4111,11 +4141,11 @@ function DocumentUploadCard({
|
|
|
4111
4141
|
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuUpload, { size: 18 })
|
|
4112
4142
|
}
|
|
4113
4143
|
),
|
|
4114
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4115
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4116
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4144
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { children: [
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "sm", fontWeight: 600, color: "gray.800", children: "Drag & drop or tap to upload" }),
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "xs", color: "gray.500", mt: 0.5, children: config.hint ?? "JPG, PNG or PDF" })
|
|
4117
4147
|
] }),
|
|
4118
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 2, mt: 1, onClick: (e) => e.stopPropagation(), children: [
|
|
4119
4149
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4120
4150
|
GhostBtn,
|
|
4121
4151
|
{
|
|
@@ -4137,13 +4167,13 @@ function DocumentUploadCard({
|
|
|
4137
4167
|
]
|
|
4138
4168
|
}
|
|
4139
4169
|
);
|
|
4140
|
-
const renderBusy = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4170
|
+
const renderBusy = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 3, align: "center", children: [
|
|
4141
4171
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4142
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4143
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { flex: "1", minW: 0, children: [
|
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName }),
|
|
4144
4174
|
status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
4145
4175
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4146
|
-
|
|
4176
|
+
import_react33.Flex,
|
|
4147
4177
|
{
|
|
4148
4178
|
justify: "space-between",
|
|
4149
4179
|
fontSize: "xs",
|
|
@@ -4151,8 +4181,8 @@ function DocumentUploadCard({
|
|
|
4151
4181
|
mt: 1,
|
|
4152
4182
|
mb: 1,
|
|
4153
4183
|
children: [
|
|
4154
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4155
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4184
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { children: "Uploading\u2026" }),
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Text, { fontWeight: 600, children: [
|
|
4156
4186
|
slot?.progress ?? 0,
|
|
4157
4187
|
"%"
|
|
4158
4188
|
] })
|
|
@@ -4160,9 +4190,9 @@ function DocumentUploadCard({
|
|
|
4160
4190
|
}
|
|
4161
4191
|
),
|
|
4162
4192
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProgressBar, { value: slot?.progress ?? 0, color: "#2563EB" })
|
|
4163
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4193
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "center", gap: 2, mt: 1.5, children: [
|
|
4164
4194
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4165
|
-
|
|
4195
|
+
import_react33.Flex,
|
|
4166
4196
|
{
|
|
4167
4197
|
align: "center",
|
|
4168
4198
|
gap: 1.5,
|
|
@@ -4179,23 +4209,23 @@ function DocumentUploadCard({
|
|
|
4179
4209
|
]
|
|
4180
4210
|
}
|
|
4181
4211
|
),
|
|
4182
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4212
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Spinner, { size: "xs", color: "#7C3AED", borderWidth: "2px" })
|
|
4183
4213
|
] }),
|
|
4184
|
-
status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4214
|
+
status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "11px", color: "gray.400", mt: 1.5, children: "This can take a few seconds. Your upload is already saved." })
|
|
4185
4215
|
] })
|
|
4186
4216
|
] });
|
|
4187
|
-
const renderFailed = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4188
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4217
|
+
const renderFailed = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { children: [
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 3, align: "flex-start", children: [
|
|
4189
4219
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4190
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4191
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4192
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4193
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4194
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4220
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { flex: "1", minW: 0, children: [
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName ?? config.label }),
|
|
4222
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "flex-start", gap: 1.5, mt: 1, color: "#B91C1C", children: [
|
|
4223
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Box, { mt: "1px", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuTriangleAlert, { size: 13 }) }),
|
|
4224
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "xs", lineHeight: "1.4", children: slot?.error ?? "We couldn't process this document." })
|
|
4195
4225
|
] })
|
|
4196
4226
|
] })
|
|
4197
4227
|
] }),
|
|
4198
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4228
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4199
4229
|
slot?.file ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4200
4230
|
GhostBtn,
|
|
4201
4231
|
{
|
|
@@ -4236,8 +4266,8 @@ function DocumentUploadCard({
|
|
|
4236
4266
|
const isSignature = config.processor === "signature";
|
|
4237
4267
|
const fieldCount = slot?.extraction ? Object.values(slot.extraction).filter(Boolean).length : 0;
|
|
4238
4268
|
const displayUrl = isSignature ? slot?.cleanedImageUrl ?? slot?.previewUrl : slot?.previewUrl;
|
|
4239
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4240
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { children: [
|
|
4270
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 3, align: "center", children: [
|
|
4241
4271
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4242
4272
|
Thumb,
|
|
4243
4273
|
{
|
|
@@ -4247,11 +4277,11 @@ function DocumentUploadCard({
|
|
|
4247
4277
|
transparent: isSignature && !!slot?.cleanedImageUrl
|
|
4248
4278
|
}
|
|
4249
4279
|
),
|
|
4250
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4251
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4252
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4280
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Box, { flex: "1", minW: 0, children: [
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName }),
|
|
4282
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "xs", color: "gray.500", children: formatBytes(slot?.fileSize) }),
|
|
4253
4283
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4254
|
-
|
|
4284
|
+
import_react33.Flex,
|
|
4255
4285
|
{
|
|
4256
4286
|
align: "center",
|
|
4257
4287
|
gap: 1.5,
|
|
@@ -4267,7 +4297,7 @@ function DocumentUploadCard({
|
|
|
4267
4297
|
)
|
|
4268
4298
|
] })
|
|
4269
4299
|
] }),
|
|
4270
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4300
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4271
4301
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4272
4302
|
GhostBtn,
|
|
4273
4303
|
{
|
|
@@ -4289,7 +4319,7 @@ function DocumentUploadCard({
|
|
|
4289
4319
|
] });
|
|
4290
4320
|
};
|
|
4291
4321
|
const requiredTag = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4292
|
-
|
|
4322
|
+
import_react33.Text,
|
|
4293
4323
|
{
|
|
4294
4324
|
fontSize: "10px",
|
|
4295
4325
|
fontWeight: 700,
|
|
@@ -4302,20 +4332,20 @@ function DocumentUploadCard({
|
|
|
4302
4332
|
children: config.required ? "REQUIRED" : "OPTIONAL"
|
|
4303
4333
|
}
|
|
4304
4334
|
);
|
|
4305
|
-
const isMobile = (0,
|
|
4335
|
+
const isMobile = (0, import_react33.useBreakpointValue)({ base: true, lg: false });
|
|
4306
4336
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4307
4337
|
Card,
|
|
4308
4338
|
{
|
|
4309
4339
|
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon6, { size: 18 }),
|
|
4310
4340
|
title: config.label,
|
|
4311
4341
|
subtitle: config.description,
|
|
4312
|
-
headerAction: !isMobile ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4342
|
+
headerAction: !isMobile ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "center", gap: 2, flexShrink: 0, children: [
|
|
4313
4343
|
requiredTag,
|
|
4314
4344
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StatusPill, { status })
|
|
4315
4345
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, {}),
|
|
4316
4346
|
children: [
|
|
4317
4347
|
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4318
|
-
|
|
4348
|
+
import_react33.Flex,
|
|
4319
4349
|
{
|
|
4320
4350
|
align: "center",
|
|
4321
4351
|
justifySelf: "flex-end",
|
|
@@ -4487,12 +4517,12 @@ var GetStarted = ({
|
|
|
4487
4517
|
onContinue,
|
|
4488
4518
|
notify = defaultNotify
|
|
4489
4519
|
}) => {
|
|
4490
|
-
const [uploadDialogOpen, setUploadDialogOpen] = (0,
|
|
4491
|
-
const [referralDialogOpen, setReferralDialogOpen] = (0,
|
|
4492
|
-
const [governmentIdStatus, setGovernmentIdStatus] = (0,
|
|
4520
|
+
const [uploadDialogOpen, setUploadDialogOpen] = (0, import_react35.useState)(false);
|
|
4521
|
+
const [referralDialogOpen, setReferralDialogOpen] = (0, import_react35.useState)(false);
|
|
4522
|
+
const [governmentIdStatus, setGovernmentIdStatus] = (0, import_react35.useState)("idle");
|
|
4493
4523
|
const { scanId } = useOcr(scanIdFn);
|
|
4494
4524
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Container_default, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4495
|
-
|
|
4525
|
+
import_react34.Box,
|
|
4496
4526
|
{
|
|
4497
4527
|
p: { base: 0, md: 8 },
|
|
4498
4528
|
rounded: "lg",
|
|
@@ -4504,10 +4534,10 @@ var GetStarted = ({
|
|
|
4504
4534
|
alignItems: "center",
|
|
4505
4535
|
mx: "auto",
|
|
4506
4536
|
children: [
|
|
4507
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4508
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.VStack, { gap: 4, align: "stretch", children: [
|
|
4538
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Box, { textAlign: "center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.H3, { children: "Let's Get Started" }) }),
|
|
4509
4539
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { textAlign: { base: "center", md: "start" }, children: "We'll be needing some documents and information to proceed with the purchase, please prepare the following in advance to smooth out the next steps" }),
|
|
4510
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4540
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Box, { bg: "gray.50", p: 8, rounded: "md", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.VStack, { align: "start", gap: 2, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Box, { mb: 4, display: "flex", flexDirection: "column", gap: 2, children: [
|
|
4511
4541
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { fontWeight: "bold", children: "Required Information" }),
|
|
4512
4542
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "1. Full Name" }),
|
|
4513
4543
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "2. Nationality" }),
|
|
@@ -4521,16 +4551,16 @@ var GetStarted = ({
|
|
|
4521
4551
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "2. Specimen Signature" })
|
|
4522
4552
|
] }) }) })
|
|
4523
4553
|
] }),
|
|
4524
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Box, { textAlign: "end", children: [
|
|
4525
4555
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4526
|
-
|
|
4556
|
+
import_react34.Dialog.Root,
|
|
4527
4557
|
{
|
|
4528
4558
|
size: { mdDown: "full", md: "md" },
|
|
4529
4559
|
open: uploadDialogOpen,
|
|
4530
4560
|
onOpenChange: (details) => setUploadDialogOpen(details.open),
|
|
4531
4561
|
children: [
|
|
4532
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4533
|
-
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4563
|
+
import_react34.Button,
|
|
4534
4564
|
{
|
|
4535
4565
|
w: { base: "sm", md: "2xl" },
|
|
4536
4566
|
mt: { base: 4, md: 8 },
|
|
@@ -4538,11 +4568,11 @@ var GetStarted = ({
|
|
|
4538
4568
|
children: "CONTINUE"
|
|
4539
4569
|
}
|
|
4540
4570
|
) }),
|
|
4541
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4542
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4543
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4544
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4545
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Portal, { children: [
|
|
4572
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Backdrop, {}),
|
|
4573
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Dialog.Content, { children: [
|
|
4574
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Title, { children: "Upload Requirements" }) }),
|
|
4575
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.VStack, { gap: 6, align: "stretch", children: [
|
|
4546
4576
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(info_card_default, { children: "To continue, please upload a valid ID. The system will use it to populate your information automatically." }),
|
|
4547
4577
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4548
4578
|
DocumentUploadCard,
|
|
@@ -4561,8 +4591,8 @@ var GetStarted = ({
|
|
|
4561
4591
|
}
|
|
4562
4592
|
)
|
|
4563
4593
|
] }) }),
|
|
4564
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4565
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4594
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Dialog.Footer, { display: "flex", justifyContent: "space-between", children: [
|
|
4595
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.ActionTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.CancelButton, {}) }),
|
|
4566
4596
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4567
4597
|
import_st_peter_ui8.NextButton,
|
|
4568
4598
|
{
|
|
@@ -4581,30 +4611,30 @@ var GetStarted = ({
|
|
|
4581
4611
|
}
|
|
4582
4612
|
)
|
|
4583
4613
|
] }),
|
|
4584
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4614
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.CloseButton, { size: "sm" }) })
|
|
4585
4615
|
] }) })
|
|
4586
4616
|
] })
|
|
4587
4617
|
]
|
|
4588
4618
|
}
|
|
4589
4619
|
),
|
|
4590
4620
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4591
|
-
|
|
4621
|
+
import_react34.Dialog.Root,
|
|
4592
4622
|
{
|
|
4593
4623
|
placement: "center",
|
|
4594
4624
|
open: referralDialogOpen,
|
|
4595
4625
|
onOpenChange: (details) => setReferralDialogOpen(details.open),
|
|
4596
4626
|
size: { mdDown: "full", md: "md" },
|
|
4597
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4598
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4599
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4600
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4601
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Portal, { children: [
|
|
4628
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Backdrop, {}),
|
|
4629
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Dialog.Content, { children: [
|
|
4630
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Title, { children: "Referral Agent" }) }),
|
|
4631
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.VStack, { align: "stretch", gap: 4, children: [
|
|
4602
4632
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.Body, { children: "Do you have an referral agent? (optional)" }),
|
|
4603
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4633
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Input, { placeholder: "Enter agent name" })
|
|
4604
4634
|
] }) }),
|
|
4605
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4635
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Dialog.Footer, { display: "flex", justifyContent: "space-between", children: [
|
|
4606
4636
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4607
|
-
|
|
4637
|
+
import_react34.Button,
|
|
4608
4638
|
{
|
|
4609
4639
|
variant: "outline",
|
|
4610
4640
|
onClick: () => {
|
|
@@ -4625,7 +4655,7 @@ var GetStarted = ({
|
|
|
4625
4655
|
}
|
|
4626
4656
|
)
|
|
4627
4657
|
] }),
|
|
4628
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4658
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.CloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.CloseButton, { size: "sm" }) })
|
|
4629
4659
|
] }) })
|
|
4630
4660
|
] })
|
|
4631
4661
|
}
|
|
@@ -4638,8 +4668,8 @@ var GetStarted = ({
|
|
|
4638
4668
|
var GetStarted_default = GetStarted;
|
|
4639
4669
|
|
|
4640
4670
|
// src/Generic/BottomQuickActions.tsx
|
|
4641
|
-
var
|
|
4642
|
-
var
|
|
4671
|
+
var import_react36 = __toESM(require("react"));
|
|
4672
|
+
var import_react37 = require("@chakra-ui/react");
|
|
4643
4673
|
var import_lu8 = require("react-icons/lu");
|
|
4644
4674
|
var import_link = __toESM(require("next/link"));
|
|
4645
4675
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
@@ -4659,7 +4689,7 @@ var SUBTITLE_COLOR = BRAND_COLORS.grey;
|
|
|
4659
4689
|
var LABEL_COLOR = BRAND_COLORS.neutralText;
|
|
4660
4690
|
var DESC_COLOR = BRAND_COLORS.grey;
|
|
4661
4691
|
var CHEVRON_COLOR = BRAND_COLORS.ashWhite;
|
|
4662
|
-
var QuickActionsHeaderCard =
|
|
4692
|
+
var QuickActionsHeaderCard = import_react36.default.memo(
|
|
4663
4693
|
({
|
|
4664
4694
|
initials,
|
|
4665
4695
|
avatarBg = AVATAR_DEFAULT_BG,
|
|
@@ -4667,7 +4697,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4667
4697
|
meta,
|
|
4668
4698
|
trailing
|
|
4669
4699
|
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4670
|
-
|
|
4700
|
+
import_react37.HStack,
|
|
4671
4701
|
{
|
|
4672
4702
|
gap: STANDARD_SPACING.sm,
|
|
4673
4703
|
px: STANDARD_SPACING.sm,
|
|
@@ -4678,7 +4708,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4678
4708
|
borderColor: HEADER_CARD_BORDER,
|
|
4679
4709
|
children: [
|
|
4680
4710
|
initials && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4681
|
-
|
|
4711
|
+
import_react37.Flex,
|
|
4682
4712
|
{
|
|
4683
4713
|
w: "40px",
|
|
4684
4714
|
h: "40px",
|
|
@@ -4688,7 +4718,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4688
4718
|
justify: "center",
|
|
4689
4719
|
flexShrink: 0,
|
|
4690
4720
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4691
|
-
|
|
4721
|
+
import_react37.Text,
|
|
4692
4722
|
{
|
|
4693
4723
|
fontSize: "14px",
|
|
4694
4724
|
fontWeight: "700",
|
|
@@ -4699,9 +4729,9 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4699
4729
|
)
|
|
4700
4730
|
}
|
|
4701
4731
|
),
|
|
4702
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4732
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Box, { flex: "1", minW: 0, children: [
|
|
4703
4733
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4704
|
-
|
|
4734
|
+
import_react37.Text,
|
|
4705
4735
|
{
|
|
4706
4736
|
fontSize: "15px",
|
|
4707
4737
|
fontWeight: "700",
|
|
@@ -4714,7 +4744,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4714
4744
|
}
|
|
4715
4745
|
),
|
|
4716
4746
|
meta && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4717
|
-
|
|
4747
|
+
import_react37.Text,
|
|
4718
4748
|
{
|
|
4719
4749
|
fontSize: "12px",
|
|
4720
4750
|
color: SUBTITLE_COLOR,
|
|
@@ -4735,11 +4765,11 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4735
4765
|
var ITEM_TRANSITION = {
|
|
4736
4766
|
transition: "background 0.15s ease, transform 0.1s ease"
|
|
4737
4767
|
};
|
|
4738
|
-
var ActionItem =
|
|
4768
|
+
var ActionItem = import_react36.default.memo(({ action }) => {
|
|
4739
4769
|
const iconBg = action.iconBg ?? DEFAULT_ICON_BG;
|
|
4740
4770
|
const iconColor = action.iconColor ?? DEFAULT_ICON_COLOR;
|
|
4741
4771
|
const inner = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4742
|
-
|
|
4772
|
+
import_react37.HStack,
|
|
4743
4773
|
{
|
|
4744
4774
|
gap: STANDARD_SPACING.sm,
|
|
4745
4775
|
px: STANDARD_SPACING.sm,
|
|
@@ -4762,7 +4792,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4762
4792
|
style: ITEM_TRANSITION,
|
|
4763
4793
|
children: [
|
|
4764
4794
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4765
|
-
|
|
4795
|
+
import_react37.Flex,
|
|
4766
4796
|
{
|
|
4767
4797
|
w: "40px",
|
|
4768
4798
|
h: "40px",
|
|
@@ -4771,12 +4801,12 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4771
4801
|
align: "center",
|
|
4772
4802
|
justify: "center",
|
|
4773
4803
|
flexShrink: 0,
|
|
4774
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Icon, { as: action.icon, boxSize: "20px", color: iconColor })
|
|
4775
4805
|
}
|
|
4776
4806
|
),
|
|
4777
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Box, { flex: "1", minW: 0, children: [
|
|
4778
4808
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4779
|
-
|
|
4809
|
+
import_react37.Text,
|
|
4780
4810
|
{
|
|
4781
4811
|
fontSize: "15px",
|
|
4782
4812
|
fontWeight: "600",
|
|
@@ -4786,7 +4816,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4786
4816
|
}
|
|
4787
4817
|
),
|
|
4788
4818
|
action.description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4789
|
-
|
|
4819
|
+
import_react37.Text,
|
|
4790
4820
|
{
|
|
4791
4821
|
fontSize: "12px",
|
|
4792
4822
|
color: DESC_COLOR,
|
|
@@ -4800,7 +4830,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4800
4830
|
)
|
|
4801
4831
|
] }),
|
|
4802
4832
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4803
|
-
|
|
4833
|
+
import_react37.Icon,
|
|
4804
4834
|
{
|
|
4805
4835
|
as: import_lu8.LuChevronRight,
|
|
4806
4836
|
boxSize: "18px",
|
|
@@ -4832,15 +4862,15 @@ var BottomQuickActions = ({
|
|
|
4832
4862
|
actions
|
|
4833
4863
|
}) => {
|
|
4834
4864
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4835
|
-
|
|
4865
|
+
import_react37.Drawer.Root,
|
|
4836
4866
|
{
|
|
4837
4867
|
open,
|
|
4838
4868
|
onOpenChange: (e) => onOpenChange(e.open),
|
|
4839
4869
|
placement: "bottom",
|
|
4840
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4841
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4842
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4843
|
-
|
|
4870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Portal, { children: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Drawer.Backdrop, {}),
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Drawer.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4873
|
+
import_react37.Drawer.Content,
|
|
4844
4874
|
{
|
|
4845
4875
|
borderTopRadius: "l3",
|
|
4846
4876
|
borderBottomRadius: "0",
|
|
@@ -4850,8 +4880,8 @@ var BottomQuickActions = ({
|
|
|
4850
4880
|
pb: `calc(${STANDARD_SPACING.sm} + env(safe-area-inset-bottom))`,
|
|
4851
4881
|
boxShadow: STANDARD_SHADOWS.level4,
|
|
4852
4882
|
children: [
|
|
4853
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4854
|
-
|
|
4883
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Flex, { justify: "center", pt: "10px", pb: "4px", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4884
|
+
import_react37.Box,
|
|
4855
4885
|
{
|
|
4856
4886
|
w: "36px",
|
|
4857
4887
|
h: "4px",
|
|
@@ -4860,16 +4890,16 @@ var BottomQuickActions = ({
|
|
|
4860
4890
|
}
|
|
4861
4891
|
) }),
|
|
4862
4892
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4863
|
-
|
|
4893
|
+
import_react37.Drawer.Header,
|
|
4864
4894
|
{
|
|
4865
4895
|
px: STANDARD_SPACING.sm,
|
|
4866
4896
|
pt: "12px",
|
|
4867
4897
|
pb: "0",
|
|
4868
4898
|
borderBottomWidth: "0",
|
|
4869
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4870
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4899
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Flex, { align: "flex-start", justify: "space-between", gap: "12px", children: [
|
|
4900
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Box, { flex: "1", minW: 0, children: [
|
|
4871
4901
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4872
|
-
|
|
4902
|
+
import_react37.Drawer.Title,
|
|
4873
4903
|
{
|
|
4874
4904
|
fontSize: "18px",
|
|
4875
4905
|
fontWeight: "700",
|
|
@@ -4880,7 +4910,7 @@ var BottomQuickActions = ({
|
|
|
4880
4910
|
}
|
|
4881
4911
|
),
|
|
4882
4912
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4883
|
-
|
|
4913
|
+
import_react37.Text,
|
|
4884
4914
|
{
|
|
4885
4915
|
fontSize: "13px",
|
|
4886
4916
|
color: SUBTITLE_COLOR,
|
|
@@ -4891,8 +4921,8 @@ var BottomQuickActions = ({
|
|
|
4891
4921
|
}
|
|
4892
4922
|
)
|
|
4893
4923
|
] }),
|
|
4894
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4895
|
-
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Drawer.CloseTrigger, { asChild: true, mt: "2px", flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4925
|
+
import_react37.CloseButton,
|
|
4896
4926
|
{
|
|
4897
4927
|
size: "sm",
|
|
4898
4928
|
color: BRAND_COLORS.neutralText,
|
|
@@ -4904,14 +4934,14 @@ var BottomQuickActions = ({
|
|
|
4904
4934
|
}
|
|
4905
4935
|
),
|
|
4906
4936
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4907
|
-
|
|
4937
|
+
import_react37.Drawer.Body,
|
|
4908
4938
|
{
|
|
4909
4939
|
px: STANDARD_SPACING.sm,
|
|
4910
4940
|
pt: STANDARD_SPACING.sm,
|
|
4911
4941
|
pb: "4px",
|
|
4912
4942
|
children: [
|
|
4913
|
-
headerSlot && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4914
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4943
|
+
headerSlot && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.Box, { mb: STANDARD_SPACING.xs, children: headerSlot }),
|
|
4944
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react37.VStack, { gap: STANDARD_SPACING.xs, align: "stretch", children: actions.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ActionItem, { action }, i)) })
|
|
4915
4945
|
]
|
|
4916
4946
|
}
|
|
4917
4947
|
)
|
|
@@ -4925,18 +4955,18 @@ var BottomQuickActions = ({
|
|
|
4925
4955
|
var BottomQuickActions_default = BottomQuickActions;
|
|
4926
4956
|
|
|
4927
4957
|
// src/Generic/NotifyInstall.tsx
|
|
4928
|
-
var
|
|
4929
|
-
var
|
|
4930
|
-
var
|
|
4958
|
+
var import_react39 = require("react");
|
|
4959
|
+
var import_react40 = require("@chakra-ui/react");
|
|
4960
|
+
var import_react41 = require("motion/react");
|
|
4931
4961
|
var import_fi2 = require("react-icons/fi");
|
|
4932
4962
|
|
|
4933
4963
|
// src/hooks/useNotifyInstall.ts
|
|
4934
|
-
var
|
|
4964
|
+
var import_react38 = require("react");
|
|
4935
4965
|
function useNotifyInstall() {
|
|
4936
|
-
const [isInstalled, setIsInstalled] = (0,
|
|
4937
|
-
const [isMobile, setIsMobile] = (0,
|
|
4938
|
-
const [installPrompt, setInstallPrompt] = (0,
|
|
4939
|
-
(0,
|
|
4966
|
+
const [isInstalled, setIsInstalled] = (0, import_react38.useState)(false);
|
|
4967
|
+
const [isMobile, setIsMobile] = (0, import_react38.useState)(false);
|
|
4968
|
+
const [installPrompt, setInstallPrompt] = (0, import_react38.useState)(null);
|
|
4969
|
+
(0, import_react38.useEffect)(() => {
|
|
4940
4970
|
const mobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
4941
4971
|
setIsMobile(mobile);
|
|
4942
4972
|
const installed = window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
@@ -4979,8 +5009,8 @@ function NotifyInstall({
|
|
|
4979
5009
|
appName
|
|
4980
5010
|
}) {
|
|
4981
5011
|
const { isInstalled, isMobile, canInstall, install } = useNotifyInstall();
|
|
4982
|
-
const [isDismissed, setIsDismissed] = (0,
|
|
4983
|
-
(0,
|
|
5012
|
+
const [isDismissed, setIsDismissed] = (0, import_react39.useState)(true);
|
|
5013
|
+
(0, import_react39.useEffect)(() => {
|
|
4984
5014
|
if (localStorage.getItem(DISMISSED_KEY) !== "true") {
|
|
4985
5015
|
setIsDismissed(false);
|
|
4986
5016
|
}
|
|
@@ -4992,9 +5022,9 @@ function NotifyInstall({
|
|
|
4992
5022
|
const showPrompt = isMobile && !isInstalled && !isDismissed;
|
|
4993
5023
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
4994
5024
|
children,
|
|
4995
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5025
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react41.AnimatePresence, { children: showPrompt && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
4996
5026
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4997
|
-
|
|
5027
|
+
import_react41.motion.div,
|
|
4998
5028
|
{
|
|
4999
5029
|
initial: { opacity: 0 },
|
|
5000
5030
|
animate: { opacity: 1 },
|
|
@@ -5013,7 +5043,7 @@ function NotifyInstall({
|
|
|
5013
5043
|
"install-backdrop"
|
|
5014
5044
|
),
|
|
5015
5045
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5016
|
-
|
|
5046
|
+
import_react41.motion.div,
|
|
5017
5047
|
{
|
|
5018
5048
|
initial: { y: "100%" },
|
|
5019
5049
|
animate: { y: 0 },
|
|
@@ -5053,9 +5083,9 @@ function NotifyInstall({
|
|
|
5053
5083
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_fi2.FiX, { size: 18 })
|
|
5054
5084
|
}
|
|
5055
5085
|
),
|
|
5056
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5086
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react40.VStack, { gap: 6, textAlign: "center", px: 6, py: 8, children: [
|
|
5057
5087
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5058
|
-
|
|
5088
|
+
import_react40.Flex,
|
|
5059
5089
|
{
|
|
5060
5090
|
boxSize: 16,
|
|
5061
5091
|
align: "center",
|
|
@@ -5064,12 +5094,12 @@ function NotifyInstall({
|
|
|
5064
5094
|
bg: "green.50",
|
|
5065
5095
|
color: "green.600",
|
|
5066
5096
|
shadow: "sm",
|
|
5067
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: import_fi2.FiDownload, boxSize: 8 })
|
|
5068
5098
|
}
|
|
5069
5099
|
),
|
|
5070
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react40.VStack, { gap: 2, children: [
|
|
5071
5101
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5072
|
-
|
|
5102
|
+
import_react40.Text,
|
|
5073
5103
|
{
|
|
5074
5104
|
fontSize: "lg",
|
|
5075
5105
|
fontWeight: "bold",
|
|
@@ -5081,10 +5111,10 @@ function NotifyInstall({
|
|
|
5081
5111
|
]
|
|
5082
5112
|
}
|
|
5083
5113
|
),
|
|
5084
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5114
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Text, { fontSize: "sm", color: "gray.500", lineHeight: "tall", children: "Add the app to your home screen for a faster, app-like experience before continuing." })
|
|
5085
5115
|
] }),
|
|
5086
5116
|
canInstall ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5087
|
-
|
|
5117
|
+
import_react40.Button,
|
|
5088
5118
|
{
|
|
5089
5119
|
onClick: install,
|
|
5090
5120
|
colorPalette: "green",
|
|
@@ -5092,12 +5122,12 @@ function NotifyInstall({
|
|
|
5092
5122
|
w: "full",
|
|
5093
5123
|
rounded: "xl",
|
|
5094
5124
|
children: [
|
|
5095
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5125
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: import_fi2.FiDownload }),
|
|
5096
5126
|
"Add to Home Screen"
|
|
5097
5127
|
]
|
|
5098
5128
|
}
|
|
5099
5129
|
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5100
|
-
|
|
5130
|
+
import_react40.VStack,
|
|
5101
5131
|
{
|
|
5102
5132
|
w: "full",
|
|
5103
5133
|
bg: "gray.50",
|
|
@@ -5107,9 +5137,9 @@ function NotifyInstall({
|
|
|
5107
5137
|
p: 4,
|
|
5108
5138
|
gap: 4,
|
|
5109
5139
|
align: "stretch",
|
|
5110
|
-
children: STEPS.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5140
|
+
children: STEPS.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react40.HStack, { gap: 3, align: "center", children: [
|
|
5111
5141
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5112
|
-
|
|
5142
|
+
import_react40.Flex,
|
|
5113
5143
|
{
|
|
5114
5144
|
boxSize: 9,
|
|
5115
5145
|
flexShrink: 0,
|
|
@@ -5120,10 +5150,10 @@ function NotifyInstall({
|
|
|
5120
5150
|
borderWidth: "1px",
|
|
5121
5151
|
borderColor: "gray.200",
|
|
5122
5152
|
color: "green.600",
|
|
5123
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: step.icon, boxSize: 4 })
|
|
5124
5154
|
}
|
|
5125
5155
|
),
|
|
5126
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Text, { fontSize: "sm", color: "gray.700", textAlign: "left", children: step.label })
|
|
5127
5157
|
] }, i))
|
|
5128
5158
|
}
|
|
5129
5159
|
)
|
|
@@ -5137,8 +5167,8 @@ function NotifyInstall({
|
|
|
5137
5167
|
}
|
|
5138
5168
|
|
|
5139
5169
|
// src/UserProfile/UserProfile.tsx
|
|
5140
|
-
var
|
|
5141
|
-
var
|
|
5170
|
+
var import_react42 = require("react");
|
|
5171
|
+
var import_react43 = require("@chakra-ui/react");
|
|
5142
5172
|
var import_ri = require("react-icons/ri");
|
|
5143
5173
|
var import_lu9 = require("react-icons/lu");
|
|
5144
5174
|
var import_hi2 = require("react-icons/hi2");
|
|
@@ -5445,28 +5475,28 @@ function ReusableProfile({
|
|
|
5445
5475
|
onTwoFactorChange,
|
|
5446
5476
|
onToast = noopToast
|
|
5447
5477
|
}) {
|
|
5448
|
-
const [profileView, setProfileView] = (0,
|
|
5449
|
-
const [fallbackColorMode, setFallbackColorMode] = (0,
|
|
5478
|
+
const [profileView, setProfileView] = (0, import_react42.useState)("main");
|
|
5479
|
+
const [fallbackColorMode, setFallbackColorMode] = (0, import_react42.useState)("light");
|
|
5450
5480
|
const colorMode = controlledColorMode ?? fallbackColorMode;
|
|
5451
|
-
const [fontSize, setFontSizeLocal] = (0,
|
|
5452
|
-
const [quickNavHrefs, setQuickNavHrefs] = (0,
|
|
5453
|
-
const [replacingIdx, setReplacingIdx] = (0,
|
|
5454
|
-
const [editName, setEditName] = (0,
|
|
5455
|
-
const [editLoading, setEditLoading] = (0,
|
|
5456
|
-
const [currentPw, setCurrentPw] = (0,
|
|
5457
|
-
const [newPw, setNewPw] = (0,
|
|
5458
|
-
const [confirmPw, setConfirmPw] = (0,
|
|
5459
|
-
const [showCurrentPw, setShowCurrentPw] = (0,
|
|
5460
|
-
const [showNewPw, setShowNewPw] = (0,
|
|
5461
|
-
const [showConfirmPw, setShowConfirmPw] = (0,
|
|
5462
|
-
const [pwLoading, setPwLoading] = (0,
|
|
5463
|
-
const [twoFactorEnabled, setTwoFactorEnabled] = (0,
|
|
5481
|
+
const [fontSize, setFontSizeLocal] = (0, import_react42.useState)("md");
|
|
5482
|
+
const [quickNavHrefs, setQuickNavHrefs] = (0, import_react42.useState)(initialQuickNavHrefs);
|
|
5483
|
+
const [replacingIdx, setReplacingIdx] = (0, import_react42.useState)(null);
|
|
5484
|
+
const [editName, setEditName] = (0, import_react42.useState)(user.displayName);
|
|
5485
|
+
const [editLoading, setEditLoading] = (0, import_react42.useState)(false);
|
|
5486
|
+
const [currentPw, setCurrentPw] = (0, import_react42.useState)("");
|
|
5487
|
+
const [newPw, setNewPw] = (0, import_react42.useState)("");
|
|
5488
|
+
const [confirmPw, setConfirmPw] = (0, import_react42.useState)("");
|
|
5489
|
+
const [showCurrentPw, setShowCurrentPw] = (0, import_react42.useState)(false);
|
|
5490
|
+
const [showNewPw, setShowNewPw] = (0, import_react42.useState)(false);
|
|
5491
|
+
const [showConfirmPw, setShowConfirmPw] = (0, import_react42.useState)(false);
|
|
5492
|
+
const [pwLoading, setPwLoading] = (0, import_react42.useState)(false);
|
|
5493
|
+
const [twoFactorEnabled, setTwoFactorEnabled] = (0, import_react42.useState)(
|
|
5464
5494
|
initialTwoFactorEnabled
|
|
5465
5495
|
);
|
|
5466
|
-
const [isMounted, setIsMounted] = (0,
|
|
5467
|
-
const isDesktopRaw = (0,
|
|
5496
|
+
const [isMounted, setIsMounted] = (0, import_react42.useState)(false);
|
|
5497
|
+
const isDesktopRaw = (0, import_react43.useBreakpointValue)({ base: false, md: true });
|
|
5468
5498
|
const isDesktop = isMounted ? isDesktopRaw ?? false : false;
|
|
5469
|
-
(0,
|
|
5499
|
+
(0, import_react42.useEffect)(() => {
|
|
5470
5500
|
setIsMounted(true);
|
|
5471
5501
|
if (!enableLocalStorage || typeof window === "undefined") return;
|
|
5472
5502
|
setFontSizeLocal(localStorage.getItem(FONT_SIZE_STORAGE_KEY) ?? "md");
|
|
@@ -5477,10 +5507,10 @@ function ReusableProfile({
|
|
|
5477
5507
|
setQuickNavHrefs(initialQuickNavHrefs);
|
|
5478
5508
|
}
|
|
5479
5509
|
}, [enableLocalStorage, initialQuickNavHrefs, storageKey]);
|
|
5480
|
-
(0,
|
|
5510
|
+
(0, import_react42.useEffect)(() => {
|
|
5481
5511
|
setEditName(user.displayName);
|
|
5482
5512
|
}, [user.displayName]);
|
|
5483
|
-
const availableOptions = (0,
|
|
5513
|
+
const availableOptions = (0, import_react42.useMemo)(
|
|
5484
5514
|
() => availableNavOptions.filter(
|
|
5485
5515
|
(option) => !user.role || option.roles.includes(user.role)
|
|
5486
5516
|
),
|
|
@@ -5610,7 +5640,7 @@ function ReusableProfile({
|
|
|
5610
5640
|
const roleLabel = user.role ? ROLE_LABELS[user.role] ?? user.role : "";
|
|
5611
5641
|
const mainContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
5612
5642
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5613
|
-
|
|
5643
|
+
import_react43.Box,
|
|
5614
5644
|
{
|
|
5615
5645
|
bg: "var(--chakra-colors-primary)",
|
|
5616
5646
|
pt: 12,
|
|
@@ -5619,20 +5649,20 @@ function ReusableProfile({
|
|
|
5619
5649
|
textAlign: "center",
|
|
5620
5650
|
children: [
|
|
5621
5651
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5622
|
-
|
|
5652
|
+
import_react43.Avatar.Root,
|
|
5623
5653
|
{
|
|
5624
5654
|
size: "2xl",
|
|
5625
5655
|
mx: "auto",
|
|
5626
5656
|
mb: 4,
|
|
5627
5657
|
colorPalette: pickPalette(user.displayName || "U"),
|
|
5628
5658
|
children: [
|
|
5629
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5630
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5659
|
+
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Avatar.Image, { src: user.avatarSrc, alt: user.displayName }),
|
|
5660
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Avatar.Fallback, { name: user.displayName })
|
|
5631
5661
|
]
|
|
5632
5662
|
}
|
|
5633
5663
|
),
|
|
5634
5664
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5635
|
-
|
|
5665
|
+
import_react43.Text,
|
|
5636
5666
|
{
|
|
5637
5667
|
color: "white",
|
|
5638
5668
|
fontWeight: "bold",
|
|
@@ -5642,9 +5672,9 @@ function ReusableProfile({
|
|
|
5642
5672
|
children: user.displayName
|
|
5643
5673
|
}
|
|
5644
5674
|
),
|
|
5645
|
-
user.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5646
|
-
roleLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5647
|
-
|
|
5675
|
+
user.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { color: "rgba(255,255,255,0.75)", fontSize: "sm", mb: 2, children: user.email }),
|
|
5676
|
+
roleLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { display: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5677
|
+
import_react43.Badge,
|
|
5648
5678
|
{
|
|
5649
5679
|
bg: "rgba(255,255,255,0.15)",
|
|
5650
5680
|
color: "white",
|
|
@@ -5660,9 +5690,9 @@ function ReusableProfile({
|
|
|
5660
5690
|
]
|
|
5661
5691
|
}
|
|
5662
5692
|
),
|
|
5663
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5693
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 5, pb: 1, children: [
|
|
5664
5694
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5665
|
-
|
|
5695
|
+
import_react43.Text,
|
|
5666
5696
|
{
|
|
5667
5697
|
fontSize: "xs",
|
|
5668
5698
|
fontWeight: "bold",
|
|
@@ -5674,7 +5704,7 @@ function ReusableProfile({
|
|
|
5674
5704
|
}
|
|
5675
5705
|
),
|
|
5676
5706
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5677
|
-
|
|
5707
|
+
import_react43.Box,
|
|
5678
5708
|
{
|
|
5679
5709
|
as: "button",
|
|
5680
5710
|
w: "full",
|
|
@@ -5683,7 +5713,7 @@ function ReusableProfile({
|
|
|
5683
5713
|
transition: "opacity 0.15s",
|
|
5684
5714
|
onClick: () => setProfileView("edit-account"),
|
|
5685
5715
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5686
|
-
|
|
5716
|
+
import_react43.Flex,
|
|
5687
5717
|
{
|
|
5688
5718
|
justify: "space-between",
|
|
5689
5719
|
align: "center",
|
|
@@ -5692,9 +5722,9 @@ function ReusableProfile({
|
|
|
5692
5722
|
borderRadius: "lg",
|
|
5693
5723
|
bg: isDesktop && profileView === "edit-account" ? "gray.100" : void 0,
|
|
5694
5724
|
children: [
|
|
5695
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5725
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5696
5726
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5697
|
-
|
|
5727
|
+
import_react43.Box,
|
|
5698
5728
|
{
|
|
5699
5729
|
w: "38px",
|
|
5700
5730
|
h: "38px",
|
|
@@ -5708,9 +5738,9 @@ function ReusableProfile({
|
|
|
5708
5738
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuUser, { size: 16 })
|
|
5709
5739
|
}
|
|
5710
5740
|
),
|
|
5711
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5712
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5713
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5741
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
5742
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Edit Account" }),
|
|
5743
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: "Update your display name and contact details" })
|
|
5714
5744
|
] })
|
|
5715
5745
|
] }),
|
|
5716
5746
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -5719,9 +5749,9 @@ function ReusableProfile({
|
|
|
5719
5749
|
)
|
|
5720
5750
|
}
|
|
5721
5751
|
),
|
|
5722
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5752
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5723
5753
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5724
|
-
|
|
5754
|
+
import_react43.Box,
|
|
5725
5755
|
{
|
|
5726
5756
|
as: "button",
|
|
5727
5757
|
w: "full",
|
|
@@ -5733,7 +5763,7 @@ function ReusableProfile({
|
|
|
5733
5763
|
setProfileView("change-password");
|
|
5734
5764
|
},
|
|
5735
5765
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5736
|
-
|
|
5766
|
+
import_react43.Flex,
|
|
5737
5767
|
{
|
|
5738
5768
|
justify: "space-between",
|
|
5739
5769
|
align: "center",
|
|
@@ -5742,9 +5772,9 @@ function ReusableProfile({
|
|
|
5742
5772
|
borderRadius: "lg",
|
|
5743
5773
|
bg: isDesktop && profileView === "change-password" ? "gray.100" : void 0,
|
|
5744
5774
|
children: [
|
|
5745
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5746
5776
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5747
|
-
|
|
5777
|
+
import_react43.Box,
|
|
5748
5778
|
{
|
|
5749
5779
|
w: "38px",
|
|
5750
5780
|
h: "38px",
|
|
@@ -5758,9 +5788,9 @@ function ReusableProfile({
|
|
|
5758
5788
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuLock, { size: 16 })
|
|
5759
5789
|
}
|
|
5760
5790
|
),
|
|
5761
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5762
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5763
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5791
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
5792
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Change Password" }),
|
|
5793
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: "Test locally through the callback prop" })
|
|
5764
5794
|
] })
|
|
5765
5795
|
] }),
|
|
5766
5796
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -5769,11 +5799,11 @@ function ReusableProfile({
|
|
|
5769
5799
|
)
|
|
5770
5800
|
}
|
|
5771
5801
|
),
|
|
5772
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5773
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5774
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5802
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5803
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5775
5805
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5776
|
-
|
|
5806
|
+
import_react43.Box,
|
|
5777
5807
|
{
|
|
5778
5808
|
w: "38px",
|
|
5779
5809
|
h: "38px",
|
|
@@ -5787,13 +5817,13 @@ function ReusableProfile({
|
|
|
5787
5817
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuShield, { size: 16 })
|
|
5788
5818
|
}
|
|
5789
5819
|
),
|
|
5790
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5791
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5792
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5820
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
5821
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Two Factor Authentication" }),
|
|
5822
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: twoFactorEnabled ? "Enabled" : "Disabled" })
|
|
5793
5823
|
] })
|
|
5794
5824
|
] }),
|
|
5795
5825
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5796
|
-
|
|
5826
|
+
import_react43.Box,
|
|
5797
5827
|
{
|
|
5798
5828
|
role: "switch",
|
|
5799
5829
|
"aria-checked": twoFactorEnabled,
|
|
@@ -5816,7 +5846,7 @@ function ReusableProfile({
|
|
|
5816
5846
|
flexShrink: 0,
|
|
5817
5847
|
outline: "none",
|
|
5818
5848
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5819
|
-
|
|
5849
|
+
import_react43.Box,
|
|
5820
5850
|
{
|
|
5821
5851
|
position: "absolute",
|
|
5822
5852
|
top: "3px",
|
|
@@ -5833,9 +5863,9 @@ function ReusableProfile({
|
|
|
5833
5863
|
)
|
|
5834
5864
|
] })
|
|
5835
5865
|
] }),
|
|
5836
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 4, pb: 2, children: [
|
|
5837
5867
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5838
|
-
|
|
5868
|
+
import_react43.Text,
|
|
5839
5869
|
{
|
|
5840
5870
|
fontSize: "xs",
|
|
5841
5871
|
fontWeight: "bold",
|
|
@@ -5846,10 +5876,10 @@ function ReusableProfile({
|
|
|
5846
5876
|
children: "Preferences"
|
|
5847
5877
|
}
|
|
5848
5878
|
),
|
|
5849
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5850
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5879
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
5880
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5851
5881
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5852
|
-
|
|
5882
|
+
import_react43.Box,
|
|
5853
5883
|
{
|
|
5854
5884
|
w: "38px",
|
|
5855
5885
|
h: "38px",
|
|
@@ -5863,15 +5893,15 @@ function ReusableProfile({
|
|
|
5863
5893
|
children: colorMode === "dark" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuMoon, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuSun, { size: 16 })
|
|
5864
5894
|
}
|
|
5865
5895
|
),
|
|
5866
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5867
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5868
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5896
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
5897
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Appearance" }),
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: colorMode === "light" ? "Light mode" : "Dark mode" })
|
|
5869
5899
|
] })
|
|
5870
5900
|
] }),
|
|
5871
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.HStack, { gap: 1.5, children: ["light", "dark"].map((mode) => {
|
|
5872
5902
|
const isActive = colorMode === mode;
|
|
5873
5903
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5874
|
-
|
|
5904
|
+
import_react43.Button,
|
|
5875
5905
|
{
|
|
5876
5906
|
size: "sm",
|
|
5877
5907
|
variant: "outline",
|
|
@@ -5888,7 +5918,7 @@ function ReusableProfile({
|
|
|
5888
5918
|
children: [
|
|
5889
5919
|
mode === "light" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuSun, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuMoon, { size: 13 }),
|
|
5890
5920
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5891
|
-
|
|
5921
|
+
import_react43.Text,
|
|
5892
5922
|
{
|
|
5893
5923
|
fontSize: "xs",
|
|
5894
5924
|
textTransform: "capitalize",
|
|
@@ -5902,11 +5932,11 @@ function ReusableProfile({
|
|
|
5902
5932
|
);
|
|
5903
5933
|
}) })
|
|
5904
5934
|
] }),
|
|
5905
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5906
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5907
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5935
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
5937
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5908
5938
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5909
|
-
|
|
5939
|
+
import_react43.Box,
|
|
5910
5940
|
{
|
|
5911
5941
|
w: "38px",
|
|
5912
5942
|
h: "38px",
|
|
@@ -5922,15 +5952,15 @@ function ReusableProfile({
|
|
|
5922
5952
|
children: "A"
|
|
5923
5953
|
}
|
|
5924
5954
|
),
|
|
5925
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5926
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5927
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Text Size" }),
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: fontSizeLabel })
|
|
5928
5958
|
] })
|
|
5929
5959
|
] }),
|
|
5930
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.HStack, { gap: 1, children: FONT_SIZES.map((option) => {
|
|
5931
5961
|
const isActive = fontSize === option.value;
|
|
5932
5962
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5933
|
-
|
|
5963
|
+
import_react43.Button,
|
|
5934
5964
|
{
|
|
5935
5965
|
size: "sm",
|
|
5936
5966
|
variant: "outline",
|
|
@@ -5946,7 +5976,7 @@ function ReusableProfile({
|
|
|
5946
5976
|
onClick: () => handleFontSize(option.value),
|
|
5947
5977
|
title: option.title,
|
|
5948
5978
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5949
|
-
|
|
5979
|
+
import_react43.Text,
|
|
5950
5980
|
{
|
|
5951
5981
|
fontWeight: isActive ? "bold" : "normal",
|
|
5952
5982
|
style: { fontSize: `${option.scale * 13}px` },
|
|
@@ -5958,9 +5988,9 @@ function ReusableProfile({
|
|
|
5958
5988
|
);
|
|
5959
5989
|
}) })
|
|
5960
5990
|
] }),
|
|
5961
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5991
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5962
5992
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5963
|
-
|
|
5993
|
+
import_react43.Box,
|
|
5964
5994
|
{
|
|
5965
5995
|
as: "button",
|
|
5966
5996
|
w: "full",
|
|
@@ -5968,10 +5998,10 @@ function ReusableProfile({
|
|
|
5968
5998
|
_hover: { opacity: 0.7 },
|
|
5969
5999
|
transition: "opacity 0.15s",
|
|
5970
6000
|
onClick: () => setProfileView("navbar-customize"),
|
|
5971
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5972
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6001
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { justify: "space-between", align: "center", py: 3, children: [
|
|
6002
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5973
6003
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5974
|
-
|
|
6004
|
+
import_react43.Box,
|
|
5975
6005
|
{
|
|
5976
6006
|
w: "38px",
|
|
5977
6007
|
h: "38px",
|
|
@@ -5985,9 +6015,9 @@ function ReusableProfile({
|
|
|
5985
6015
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuArrowLeftRight, { size: 16 })
|
|
5986
6016
|
}
|
|
5987
6017
|
),
|
|
5988
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5989
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5990
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6018
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
6019
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "semibold", children: "Quick Navigation" }),
|
|
6020
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: [
|
|
5991
6021
|
quickNavHrefs.length,
|
|
5992
6022
|
" of ",
|
|
5993
6023
|
maxQuickNavItems,
|
|
@@ -6000,8 +6030,8 @@ function ReusableProfile({
|
|
|
6000
6030
|
}
|
|
6001
6031
|
)
|
|
6002
6032
|
] }),
|
|
6003
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6004
|
-
|
|
6033
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { px: 4, pt: 4, pb: 10, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.VStack, { gap: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6034
|
+
import_react43.Button,
|
|
6005
6035
|
{
|
|
6006
6036
|
w: "full",
|
|
6007
6037
|
variant: "outline",
|
|
@@ -6014,9 +6044,9 @@ function ReusableProfile({
|
|
|
6014
6044
|
) }) })
|
|
6015
6045
|
] });
|
|
6016
6046
|
const editAccountContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
6017
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6047
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
6018
6048
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6019
|
-
|
|
6049
|
+
import_react43.IconButton,
|
|
6020
6050
|
{
|
|
6021
6051
|
size: "sm",
|
|
6022
6052
|
variant: "ghost",
|
|
@@ -6026,17 +6056,17 @@ function ReusableProfile({
|
|
|
6026
6056
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
6027
6057
|
}
|
|
6028
6058
|
),
|
|
6029
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontWeight: "bold", fontSize: "md", children: "Edit Account" })
|
|
6030
6060
|
] }) }),
|
|
6031
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6032
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6033
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { textAlign: "center", pt: 5, pb: 4, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Avatar.Root, { size: "xl", mx: "auto", mb: 1, children: [
|
|
6062
|
+
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Avatar.Image, { src: user.avatarSrc, alt: editName }),
|
|
6063
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Avatar.Fallback, { name: editName })
|
|
6034
6064
|
] }) }),
|
|
6035
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6036
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6037
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.VStack, { gap: 4, px: 4, pb: 10, align: "stretch", children: [
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Display Name" }),
|
|
6038
6068
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6039
|
-
|
|
6069
|
+
import_react43.Input,
|
|
6040
6070
|
{
|
|
6041
6071
|
value: editName,
|
|
6042
6072
|
onChange: (event) => setEditName(event.target.value),
|
|
@@ -6045,10 +6075,10 @@ function ReusableProfile({
|
|
|
6045
6075
|
}
|
|
6046
6076
|
)
|
|
6047
6077
|
] }),
|
|
6048
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6049
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Email" }),
|
|
6050
6080
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6051
|
-
|
|
6081
|
+
import_react43.Input,
|
|
6052
6082
|
{
|
|
6053
6083
|
value: user.email ?? "",
|
|
6054
6084
|
readOnly: true,
|
|
@@ -6058,10 +6088,10 @@ function ReusableProfile({
|
|
|
6058
6088
|
}
|
|
6059
6089
|
)
|
|
6060
6090
|
] }),
|
|
6061
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6062
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Mobile Number" }),
|
|
6063
6093
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6064
|
-
|
|
6094
|
+
import_react43.Input,
|
|
6065
6095
|
{
|
|
6066
6096
|
value: user.mobileNumber ?? "",
|
|
6067
6097
|
readOnly: true,
|
|
@@ -6072,7 +6102,7 @@ function ReusableProfile({
|
|
|
6072
6102
|
)
|
|
6073
6103
|
] }),
|
|
6074
6104
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6075
|
-
|
|
6105
|
+
import_react43.Button,
|
|
6076
6106
|
{
|
|
6077
6107
|
w: "full",
|
|
6078
6108
|
mt: 2,
|
|
@@ -6087,9 +6117,9 @@ function ReusableProfile({
|
|
|
6087
6117
|
] })
|
|
6088
6118
|
] });
|
|
6089
6119
|
const changePasswordContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
6090
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
6091
6121
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6092
|
-
|
|
6122
|
+
import_react43.IconButton,
|
|
6093
6123
|
{
|
|
6094
6124
|
size: "sm",
|
|
6095
6125
|
variant: "ghost",
|
|
@@ -6099,16 +6129,16 @@ function ReusableProfile({
|
|
|
6099
6129
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
6100
6130
|
}
|
|
6101
6131
|
),
|
|
6102
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6132
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontWeight: "bold", fontSize: "md", children: "Change Password" })
|
|
6103
6133
|
] }) }),
|
|
6104
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6105
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6106
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6134
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.VStack, { gap: 5, px: 4, pt: 6, pb: 10, children: [
|
|
6135
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6136
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Current Password" }),
|
|
6107
6137
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6108
|
-
|
|
6138
|
+
import_react43.InputGroup,
|
|
6109
6139
|
{
|
|
6110
6140
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6111
|
-
|
|
6141
|
+
import_react43.IconButton,
|
|
6112
6142
|
{
|
|
6113
6143
|
size: "xs",
|
|
6114
6144
|
variant: "ghost",
|
|
@@ -6119,7 +6149,7 @@ function ReusableProfile({
|
|
|
6119
6149
|
}
|
|
6120
6150
|
),
|
|
6121
6151
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6122
|
-
|
|
6152
|
+
import_react43.Input,
|
|
6123
6153
|
{
|
|
6124
6154
|
type: showCurrentPw ? "text" : "password",
|
|
6125
6155
|
value: currentPw,
|
|
@@ -6131,13 +6161,13 @@ function ReusableProfile({
|
|
|
6131
6161
|
}
|
|
6132
6162
|
)
|
|
6133
6163
|
] }),
|
|
6134
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6135
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6164
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "New Password" }),
|
|
6136
6166
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6137
|
-
|
|
6167
|
+
import_react43.InputGroup,
|
|
6138
6168
|
{
|
|
6139
6169
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6140
|
-
|
|
6170
|
+
import_react43.IconButton,
|
|
6141
6171
|
{
|
|
6142
6172
|
size: "xs",
|
|
6143
6173
|
variant: "ghost",
|
|
@@ -6148,7 +6178,7 @@ function ReusableProfile({
|
|
|
6148
6178
|
}
|
|
6149
6179
|
),
|
|
6150
6180
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6151
|
-
|
|
6181
|
+
import_react43.Input,
|
|
6152
6182
|
{
|
|
6153
6183
|
type: showNewPw ? "text" : "password",
|
|
6154
6184
|
value: newPw,
|
|
@@ -6159,9 +6189,9 @@ function ReusableProfile({
|
|
|
6159
6189
|
)
|
|
6160
6190
|
}
|
|
6161
6191
|
),
|
|
6162
|
-
newPw && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6163
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6164
|
-
|
|
6192
|
+
newPw && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { mt: 2, children: [
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Flex, { gap: 1, mb: 1, children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6194
|
+
import_react43.Box,
|
|
6165
6195
|
{
|
|
6166
6196
|
flex: 1,
|
|
6167
6197
|
h: "3px",
|
|
@@ -6171,16 +6201,16 @@ function ReusableProfile({
|
|
|
6171
6201
|
},
|
|
6172
6202
|
i
|
|
6173
6203
|
)) }),
|
|
6174
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6204
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: pwMeta.color, fontWeight: "medium", children: pwMeta.label })
|
|
6175
6205
|
] })
|
|
6176
6206
|
] }),
|
|
6177
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6178
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6207
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6208
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Confirm New Password" }),
|
|
6179
6209
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6180
|
-
|
|
6210
|
+
import_react43.InputGroup,
|
|
6181
6211
|
{
|
|
6182
6212
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6183
|
-
|
|
6213
|
+
import_react43.IconButton,
|
|
6184
6214
|
{
|
|
6185
6215
|
size: "xs",
|
|
6186
6216
|
variant: "ghost",
|
|
@@ -6191,7 +6221,7 @@ function ReusableProfile({
|
|
|
6191
6221
|
}
|
|
6192
6222
|
),
|
|
6193
6223
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6194
|
-
|
|
6224
|
+
import_react43.Input,
|
|
6195
6225
|
{
|
|
6196
6226
|
type: showConfirmPw ? "text" : "password",
|
|
6197
6227
|
value: confirmPw,
|
|
@@ -6202,10 +6232,10 @@ function ReusableProfile({
|
|
|
6202
6232
|
)
|
|
6203
6233
|
}
|
|
6204
6234
|
),
|
|
6205
|
-
confirmPw && confirmPw !== newPw && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6235
|
+
confirmPw && confirmPw !== newPw && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "xs", color: "red.500", mt: 1, children: "Passwords do not match" })
|
|
6206
6236
|
] }),
|
|
6207
6237
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6208
|
-
|
|
6238
|
+
import_react43.Button,
|
|
6209
6239
|
{
|
|
6210
6240
|
w: "full",
|
|
6211
6241
|
mt: 1,
|
|
@@ -6222,7 +6252,7 @@ function ReusableProfile({
|
|
|
6222
6252
|
] });
|
|
6223
6253
|
const navbarCustomizeContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
6224
6254
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6225
|
-
|
|
6255
|
+
import_react43.Box,
|
|
6226
6256
|
{
|
|
6227
6257
|
px: 4,
|
|
6228
6258
|
pt: 4,
|
|
@@ -6233,9 +6263,9 @@ function ReusableProfile({
|
|
|
6233
6263
|
top: 0,
|
|
6234
6264
|
bg: "bg",
|
|
6235
6265
|
zIndex: 1,
|
|
6236
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 2, pr: 10, children: [
|
|
6237
6267
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6238
|
-
|
|
6268
|
+
import_react43.IconButton,
|
|
6239
6269
|
{
|
|
6240
6270
|
size: "sm",
|
|
6241
6271
|
variant: "ghost",
|
|
@@ -6248,9 +6278,9 @@ function ReusableProfile({
|
|
|
6248
6278
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
6249
6279
|
}
|
|
6250
6280
|
),
|
|
6251
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6252
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6253
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6281
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
6282
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontWeight: "bold", fontSize: "md", children: "Quick Navigation" }),
|
|
6283
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Text, { fontSize: "xs", color: "gray.500", children: [
|
|
6254
6284
|
"Choose up to ",
|
|
6255
6285
|
maxQuickNavItems,
|
|
6256
6286
|
" shortcuts for the bottom bar"
|
|
@@ -6259,10 +6289,10 @@ function ReusableProfile({
|
|
|
6259
6289
|
] })
|
|
6260
6290
|
}
|
|
6261
6291
|
),
|
|
6262
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6263
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6292
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 5, pb: 2, children: [
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", justify: "space-between", mb: 3, children: [
|
|
6264
6294
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6265
|
-
|
|
6295
|
+
import_react43.Text,
|
|
6266
6296
|
{
|
|
6267
6297
|
fontSize: "xs",
|
|
6268
6298
|
fontWeight: "bold",
|
|
@@ -6273,7 +6303,7 @@ function ReusableProfile({
|
|
|
6273
6303
|
}
|
|
6274
6304
|
),
|
|
6275
6305
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6276
|
-
|
|
6306
|
+
import_react43.Text,
|
|
6277
6307
|
{
|
|
6278
6308
|
fontSize: "xs",
|
|
6279
6309
|
color: quickNavHrefs.length >= maxQuickNavItems ? "orange.500" : "gray.400",
|
|
@@ -6287,7 +6317,7 @@ function ReusableProfile({
|
|
|
6287
6317
|
)
|
|
6288
6318
|
] }),
|
|
6289
6319
|
quickNavHrefs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6290
|
-
|
|
6320
|
+
import_react43.Flex,
|
|
6291
6321
|
{
|
|
6292
6322
|
align: "center",
|
|
6293
6323
|
justify: "center",
|
|
@@ -6296,18 +6326,18 @@ function ReusableProfile({
|
|
|
6296
6326
|
borderWidth: "1px",
|
|
6297
6327
|
borderStyle: "dashed",
|
|
6298
6328
|
borderColor: "gray.200",
|
|
6299
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", color: "gray.400", children: "No items pinned \u2014 add from below" })
|
|
6300
6330
|
}
|
|
6301
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6331
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.VStack, { gap: 0, children: quickNavHrefs.map((href, idx) => {
|
|
6302
6332
|
const option = availableOptions.find((item) => item.key === href);
|
|
6303
6333
|
if (!option) return null;
|
|
6304
6334
|
const ItemIcon = option.Icon;
|
|
6305
6335
|
const isFirst = idx === 0;
|
|
6306
6336
|
const isLast = idx === quickNavHrefs.length - 1;
|
|
6307
6337
|
const isReplacing = replacingIdx === idx;
|
|
6308
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6309
6339
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6310
|
-
|
|
6340
|
+
import_react43.Flex,
|
|
6311
6341
|
{
|
|
6312
6342
|
justify: "space-between",
|
|
6313
6343
|
align: "center",
|
|
@@ -6319,9 +6349,9 @@ function ReusableProfile({
|
|
|
6319
6349
|
borderColor: isReplacing ? "orange.200" : void 0,
|
|
6320
6350
|
transition: "all 0.15s",
|
|
6321
6351
|
children: [
|
|
6322
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6352
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
6323
6353
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6324
|
-
|
|
6354
|
+
import_react43.Box,
|
|
6325
6355
|
{
|
|
6326
6356
|
w: "36px",
|
|
6327
6357
|
h: "36px",
|
|
@@ -6335,10 +6365,10 @@ function ReusableProfile({
|
|
|
6335
6365
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemIcon, { size: 15 })
|
|
6336
6366
|
}
|
|
6337
6367
|
),
|
|
6338
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6339
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6368
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", fontWeight: "medium", children: option.title }),
|
|
6340
6370
|
isReplacing && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6341
|
-
|
|
6371
|
+
import_react43.Text,
|
|
6342
6372
|
{
|
|
6343
6373
|
fontSize: "xs",
|
|
6344
6374
|
color: "orange.500",
|
|
@@ -6348,9 +6378,9 @@ function ReusableProfile({
|
|
|
6348
6378
|
)
|
|
6349
6379
|
] })
|
|
6350
6380
|
] }),
|
|
6351
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6381
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.HStack, { gap: 0.5, children: [
|
|
6352
6382
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6353
|
-
|
|
6383
|
+
import_react43.IconButton,
|
|
6354
6384
|
{
|
|
6355
6385
|
size: "xs",
|
|
6356
6386
|
variant: "ghost",
|
|
@@ -6362,7 +6392,7 @@ function ReusableProfile({
|
|
|
6362
6392
|
}
|
|
6363
6393
|
),
|
|
6364
6394
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6365
|
-
|
|
6395
|
+
import_react43.IconButton,
|
|
6366
6396
|
{
|
|
6367
6397
|
size: "xs",
|
|
6368
6398
|
variant: "ghost",
|
|
@@ -6374,7 +6404,7 @@ function ReusableProfile({
|
|
|
6374
6404
|
}
|
|
6375
6405
|
),
|
|
6376
6406
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6377
|
-
|
|
6407
|
+
import_react43.IconButton,
|
|
6378
6408
|
{
|
|
6379
6409
|
size: "xs",
|
|
6380
6410
|
variant: isReplacing ? "solid" : "ghost",
|
|
@@ -6387,7 +6417,7 @@ function ReusableProfile({
|
|
|
6387
6417
|
}
|
|
6388
6418
|
),
|
|
6389
6419
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6390
|
-
|
|
6420
|
+
import_react43.IconButton,
|
|
6391
6421
|
{
|
|
6392
6422
|
size: "xs",
|
|
6393
6423
|
variant: "ghost",
|
|
@@ -6403,16 +6433,16 @@ function ReusableProfile({
|
|
|
6403
6433
|
]
|
|
6404
6434
|
}
|
|
6405
6435
|
),
|
|
6406
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6436
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {})
|
|
6407
6437
|
] }, href);
|
|
6408
6438
|
}) })
|
|
6409
6439
|
] }),
|
|
6410
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6411
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6412
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6413
|
-
replacingIdx !== null ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6440
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, { mx: 4, my: 1 }),
|
|
6441
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 4, pb: 10, children: [
|
|
6442
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", justify: "space-between", mb: 3, children: [
|
|
6443
|
+
replacingIdx !== null ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { children: [
|
|
6414
6444
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6415
|
-
|
|
6445
|
+
import_react43.Text,
|
|
6416
6446
|
{
|
|
6417
6447
|
fontSize: "xs",
|
|
6418
6448
|
fontWeight: "bold",
|
|
@@ -6422,7 +6452,7 @@ function ReusableProfile({
|
|
|
6422
6452
|
children: "Select Replacement"
|
|
6423
6453
|
}
|
|
6424
6454
|
),
|
|
6425
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6455
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Text, { fontSize: "xs", color: "gray.500", mt: 0.5, children: [
|
|
6426
6456
|
'for "',
|
|
6427
6457
|
availableOptions.find(
|
|
6428
6458
|
(item) => item.key === quickNavHrefs[replacingIdx]
|
|
@@ -6430,7 +6460,7 @@ function ReusableProfile({
|
|
|
6430
6460
|
'"'
|
|
6431
6461
|
] })
|
|
6432
6462
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6433
|
-
|
|
6463
|
+
import_react43.Text,
|
|
6434
6464
|
{
|
|
6435
6465
|
fontSize: "xs",
|
|
6436
6466
|
fontWeight: "bold",
|
|
@@ -6441,7 +6471,7 @@ function ReusableProfile({
|
|
|
6441
6471
|
}
|
|
6442
6472
|
),
|
|
6443
6473
|
replacingIdx !== null && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6444
|
-
|
|
6474
|
+
import_react43.Button,
|
|
6445
6475
|
{
|
|
6446
6476
|
size: "xs",
|
|
6447
6477
|
variant: "ghost",
|
|
@@ -6451,17 +6481,17 @@ function ReusableProfile({
|
|
|
6451
6481
|
}
|
|
6452
6482
|
)
|
|
6453
6483
|
] }),
|
|
6454
|
-
unpinnedOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6484
|
+
unpinnedOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", color: "gray.400", py: 3, textAlign: "center", children: "All available items are pinned" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.VStack, { gap: 0, children: unpinnedOptions.map((option, idx) => {
|
|
6455
6485
|
const ItemIcon = option.Icon;
|
|
6456
6486
|
const isLast = idx === unpinnedOptions.length - 1;
|
|
6457
6487
|
const isReplacingMode = replacingIdx !== null;
|
|
6458
6488
|
const canAdd = quickNavHrefs.length < maxQuickNavItems;
|
|
6459
6489
|
const actionEnabled = isReplacingMode || canAdd;
|
|
6460
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6461
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6462
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { justify: "space-between", align: "center", py: 2.5, children: [
|
|
6492
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
6463
6493
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6464
|
-
|
|
6494
|
+
import_react43.Box,
|
|
6465
6495
|
{
|
|
6466
6496
|
w: "36px",
|
|
6467
6497
|
h: "36px",
|
|
@@ -6476,7 +6506,7 @@ function ReusableProfile({
|
|
|
6476
6506
|
}
|
|
6477
6507
|
),
|
|
6478
6508
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6479
|
-
|
|
6509
|
+
import_react43.Text,
|
|
6480
6510
|
{
|
|
6481
6511
|
fontSize: "sm",
|
|
6482
6512
|
fontWeight: "medium",
|
|
@@ -6486,7 +6516,7 @@ function ReusableProfile({
|
|
|
6486
6516
|
)
|
|
6487
6517
|
] }),
|
|
6488
6518
|
isReplacingMode ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6489
|
-
|
|
6519
|
+
import_react43.IconButton,
|
|
6490
6520
|
{
|
|
6491
6521
|
size: "xs",
|
|
6492
6522
|
variant: "outline",
|
|
@@ -6498,7 +6528,7 @@ function ReusableProfile({
|
|
|
6498
6528
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuArrowLeftRight, { size: 13 })
|
|
6499
6529
|
}
|
|
6500
6530
|
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6501
|
-
|
|
6531
|
+
import_react43.IconButton,
|
|
6502
6532
|
{
|
|
6503
6533
|
size: "xs",
|
|
6504
6534
|
variant: "outline",
|
|
@@ -6512,7 +6542,7 @@ function ReusableProfile({
|
|
|
6512
6542
|
}
|
|
6513
6543
|
)
|
|
6514
6544
|
] }),
|
|
6515
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6545
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {})
|
|
6516
6546
|
] }, option.key);
|
|
6517
6547
|
}) })
|
|
6518
6548
|
] })
|
|
@@ -6520,7 +6550,7 @@ function ReusableProfile({
|
|
|
6520
6550
|
const subViewContent = profileView === "edit-account" ? editAccountContent : profileView === "change-password" ? changePasswordContent : profileView === "navbar-customize" ? navbarCustomizeContent : null;
|
|
6521
6551
|
if (isDesktop) {
|
|
6522
6552
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6523
|
-
|
|
6553
|
+
import_react43.Flex,
|
|
6524
6554
|
{
|
|
6525
6555
|
maxW: "6xl",
|
|
6526
6556
|
mx: "auto",
|
|
@@ -6531,7 +6561,7 @@ function ReusableProfile({
|
|
|
6531
6561
|
align: "start",
|
|
6532
6562
|
children: [
|
|
6533
6563
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6534
|
-
|
|
6564
|
+
import_react43.Box,
|
|
6535
6565
|
{
|
|
6536
6566
|
w: { md: "300px", lg: "340px" },
|
|
6537
6567
|
flexShrink: 0,
|
|
@@ -6546,7 +6576,7 @@ function ReusableProfile({
|
|
|
6546
6576
|
}
|
|
6547
6577
|
),
|
|
6548
6578
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6549
|
-
|
|
6579
|
+
import_react43.Box,
|
|
6550
6580
|
{
|
|
6551
6581
|
flex: "1",
|
|
6552
6582
|
minW: 0,
|
|
@@ -6557,7 +6587,7 @@ function ReusableProfile({
|
|
|
6557
6587
|
bg: "bg",
|
|
6558
6588
|
minH: "540px",
|
|
6559
6589
|
children: subViewContent ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6560
|
-
|
|
6590
|
+
import_react43.Flex,
|
|
6561
6591
|
{
|
|
6562
6592
|
direction: "column",
|
|
6563
6593
|
align: "center",
|
|
@@ -6568,7 +6598,7 @@ function ReusableProfile({
|
|
|
6568
6598
|
color: "gray.400",
|
|
6569
6599
|
children: [
|
|
6570
6600
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6571
|
-
|
|
6601
|
+
import_react43.Box,
|
|
6572
6602
|
{
|
|
6573
6603
|
w: "56px",
|
|
6574
6604
|
h: "56px",
|
|
@@ -6581,7 +6611,7 @@ function ReusableProfile({
|
|
|
6581
6611
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuUser, { size: 24 })
|
|
6582
6612
|
}
|
|
6583
6613
|
),
|
|
6584
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontSize: "sm", mt: 1, maxW: "280px", children: "Choose Edit Account, Change Password, or Quick Navigation from the menu to update your details here." })
|
|
6585
6615
|
]
|
|
6586
6616
|
}
|
|
6587
6617
|
)
|
|
@@ -6591,18 +6621,20 @@ function ReusableProfile({
|
|
|
6591
6621
|
}
|
|
6592
6622
|
);
|
|
6593
6623
|
}
|
|
6594
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Box, { maxW: "480px", mx: "auto", w: "full", minH: "100%", bg: "bg", children: profileView === "main" ? mainContent : subViewContent });
|
|
6595
6625
|
}
|
|
6596
6626
|
var UserProfile_default = ReusableProfile;
|
|
6597
6627
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6598
6628
|
0 && (module.exports = {
|
|
6599
6629
|
APIError,
|
|
6630
|
+
APPLICATION_DATA_CHANGE_EVENT,
|
|
6600
6631
|
Beneficiary,
|
|
6601
6632
|
BottomQuickActions,
|
|
6602
6633
|
DocumentUploadCard,
|
|
6603
6634
|
GeoApifyService,
|
|
6604
6635
|
GetStarted,
|
|
6605
6636
|
HealthDeclaration,
|
|
6637
|
+
LIFE_PLAN_APPLICATION_KEY,
|
|
6606
6638
|
LifePlanApplication1,
|
|
6607
6639
|
LifePlanApplication2,
|
|
6608
6640
|
LifePlanApplication3,
|
|
@@ -6616,14 +6648,19 @@ var UserProfile_default = ReusableProfile;
|
|
|
6616
6648
|
UserProfile,
|
|
6617
6649
|
api,
|
|
6618
6650
|
apiClient,
|
|
6651
|
+
clearApplicationData,
|
|
6619
6652
|
clearOcrResult,
|
|
6620
6653
|
configureApi,
|
|
6621
6654
|
createEmptyApplicationData,
|
|
6655
|
+
loadApplicationData,
|
|
6622
6656
|
loadApplicationDataFromLocalStorage,
|
|
6623
6657
|
markOcrApplied,
|
|
6624
6658
|
readOcrResult,
|
|
6659
|
+
saveApplicationData,
|
|
6625
6660
|
saveApplicationDataToLocalStorage,
|
|
6626
6661
|
saveOcrResult,
|
|
6662
|
+
updateApplicationData,
|
|
6663
|
+
useApplicationData,
|
|
6627
6664
|
useOcr
|
|
6628
6665
|
});
|
|
6629
6666
|
//# sourceMappingURL=index.js.map
|