@splpi/estore-shared-components 7.0.3 → 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 +105 -7
- package/dist/index.d.ts +105 -7
- package/dist/index.js +844 -583
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +451 -204
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -30,11 +30,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
APIError: () => APIError,
|
|
34
|
+
APPLICATION_DATA_CHANGE_EVENT: () => APPLICATION_DATA_CHANGE_EVENT,
|
|
33
35
|
Beneficiary: () => beneficiary_default,
|
|
34
36
|
BottomQuickActions: () => BottomQuickActions_default,
|
|
35
37
|
DocumentUploadCard: () => DocumentUploadCard,
|
|
38
|
+
GeoApifyService: () => GeoApifyService,
|
|
36
39
|
GetStarted: () => GetStarted_default,
|
|
37
40
|
HealthDeclaration: () => HealthDeclaration_default,
|
|
41
|
+
LIFE_PLAN_APPLICATION_KEY: () => LIFE_PLAN_APPLICATION_KEY,
|
|
38
42
|
LifePlanApplication1: () => LifePlanApplication1_default,
|
|
39
43
|
LifePlanApplication2: () => LifePlanApplication2_default,
|
|
40
44
|
LifePlanApplication3: () => LifePlanApplication3_default,
|
|
@@ -42,15 +46,25 @@ __export(index_exports, {
|
|
|
42
46
|
LifePlanApplicationStepWrapper: () => LifePlanApplicationStepWrapper_default,
|
|
43
47
|
NotifyInstall: () => NotifyInstall,
|
|
44
48
|
OCR_STORAGE_KEY: () => OCR_STORAGE_KEY,
|
|
49
|
+
OcrService: () => OcrService,
|
|
50
|
+
PayMongoService: () => PayMongoService,
|
|
45
51
|
SharedLifePlanApplication: () => SharedLifePlanApplication_default,
|
|
46
52
|
UserProfile: () => UserProfile_default,
|
|
53
|
+
api: () => api,
|
|
54
|
+
apiClient: () => apiClient,
|
|
55
|
+
clearApplicationData: () => clearApplicationData,
|
|
47
56
|
clearOcrResult: () => clearOcrResult,
|
|
57
|
+
configureApi: () => configureApi,
|
|
48
58
|
createEmptyApplicationData: () => createEmptyApplicationData,
|
|
59
|
+
loadApplicationData: () => loadApplicationData,
|
|
49
60
|
loadApplicationDataFromLocalStorage: () => loadApplicationDataFromLocalStorage,
|
|
50
61
|
markOcrApplied: () => markOcrApplied,
|
|
51
62
|
readOcrResult: () => readOcrResult,
|
|
63
|
+
saveApplicationData: () => saveApplicationData,
|
|
52
64
|
saveApplicationDataToLocalStorage: () => saveApplicationDataToLocalStorage,
|
|
53
65
|
saveOcrResult: () => saveOcrResult,
|
|
66
|
+
updateApplicationData: () => updateApplicationData,
|
|
67
|
+
useApplicationData: () => useApplicationData,
|
|
54
68
|
useOcr: () => useOcr
|
|
55
69
|
});
|
|
56
70
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -281,7 +295,7 @@ var STANDARD_ICON_BUTTON_STYLES = {
|
|
|
281
295
|
var OCR_STORAGE_KEY = "ocrResult";
|
|
282
296
|
var readStored = () => {
|
|
283
297
|
try {
|
|
284
|
-
const raw =
|
|
298
|
+
const raw = sessionStorage.getItem(OCR_STORAGE_KEY);
|
|
285
299
|
return raw ? JSON.parse(raw) : null;
|
|
286
300
|
} catch {
|
|
287
301
|
return null;
|
|
@@ -298,7 +312,7 @@ var markOcrApplied = (section) => {
|
|
|
298
312
|
const stored = readStored();
|
|
299
313
|
if (!stored || stored.applied?.[section]) return false;
|
|
300
314
|
try {
|
|
301
|
-
|
|
315
|
+
sessionStorage.setItem(
|
|
302
316
|
OCR_STORAGE_KEY,
|
|
303
317
|
JSON.stringify({ ...stored, applied: { ...stored.applied, [section]: true } })
|
|
304
318
|
);
|
|
@@ -310,14 +324,14 @@ var markOcrApplied = (section) => {
|
|
|
310
324
|
var saveOcrResult = (value) => {
|
|
311
325
|
if (typeof window === "undefined") return;
|
|
312
326
|
try {
|
|
313
|
-
|
|
327
|
+
sessionStorage.setItem(OCR_STORAGE_KEY, JSON.stringify(value));
|
|
314
328
|
} catch {
|
|
315
329
|
}
|
|
316
330
|
};
|
|
317
331
|
var clearOcrResult = () => {
|
|
318
332
|
if (typeof window === "undefined") return;
|
|
319
333
|
try {
|
|
320
|
-
|
|
334
|
+
sessionStorage.removeItem(OCR_STORAGE_KEY);
|
|
321
335
|
} catch {
|
|
322
336
|
}
|
|
323
337
|
};
|
|
@@ -433,22 +447,22 @@ var LifePlanApplication1 = ({
|
|
|
433
447
|
onUpdate
|
|
434
448
|
}) => {
|
|
435
449
|
const [formData, setFormData] = (0, import_react4.useState)(() => applyOcr({
|
|
436
|
-
firstName: initialData?.firstName ?? "
|
|
437
|
-
middleName: initialData?.middleName ?? "
|
|
438
|
-
lastName: initialData?.lastName ?? "
|
|
450
|
+
firstName: initialData?.firstName ?? "",
|
|
451
|
+
middleName: initialData?.middleName ?? "",
|
|
452
|
+
lastName: initialData?.lastName ?? "",
|
|
439
453
|
suffix: initialData?.suffix ?? "",
|
|
440
|
-
birthDate: initialData?.birthDate ?? "
|
|
441
|
-
idType: initialData?.idType ?? "
|
|
442
|
-
idNumber: initialData?.idNumber ?? "
|
|
443
|
-
height: initialData?.height ??
|
|
444
|
-
weight: initialData?.weight ??
|
|
445
|
-
gender: initialData?.gender ?? "
|
|
446
|
-
civilStatus: initialData?.civilStatus ?? "
|
|
447
|
-
nationality: initialData?.nationality ?? "
|
|
448
|
-
mobileNumber: initialData?.mobileNumber ?? "
|
|
449
|
-
emailAddress: initialData?.emailAddress ?? "
|
|
450
|
-
mailingAddress: initialData?.mailingAddress ?? "
|
|
451
|
-
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 ?? ""
|
|
452
466
|
}, readOcrResult("personal")));
|
|
453
467
|
const updateFormData = (nextData) => {
|
|
454
468
|
setFormData(nextData);
|
|
@@ -919,15 +933,16 @@ var matchOption = (candidates, options) => {
|
|
|
919
933
|
return "";
|
|
920
934
|
};
|
|
921
935
|
var LifePlanApplication2 = ({
|
|
936
|
+
initialData,
|
|
922
937
|
onAddressUpdate,
|
|
923
938
|
parseAddress
|
|
924
939
|
}) => {
|
|
925
|
-
const [lot, setLot] = (0, import_react6.useState)("");
|
|
926
|
-
const [street, setStreet] = (0, import_react6.useState)("");
|
|
927
|
-
const [city, setCity] = (0, import_react6.useState)("");
|
|
928
|
-
const [province, setProvince] = (0, import_react6.useState)("");
|
|
929
|
-
const [district, setDistrict] = (0, import_react6.useState)("");
|
|
930
|
-
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 ?? "");
|
|
931
946
|
(0, import_react6.useEffect)(() => {
|
|
932
947
|
if (!parseAddress) return;
|
|
933
948
|
const ocr = readOcrResult("address");
|
|
@@ -1050,13 +1065,13 @@ var LifePlanApplication3 = ({
|
|
|
1050
1065
|
onUpdate
|
|
1051
1066
|
}) => {
|
|
1052
1067
|
const [formData, setFormData] = import_react8.default.useState({
|
|
1053
|
-
occupation: initialData?.occupation ?? "
|
|
1054
|
-
employerName: initialData?.employerName ?? "
|
|
1055
|
-
employmentStatus: initialData?.employmentStatus ?? "
|
|
1056
|
-
officeAddress: initialData?.officeAddress ?? "
|
|
1057
|
-
TIN: initialData?.TIN ?? "
|
|
1058
|
-
SSS: initialData?.SSS ?? "
|
|
1059
|
-
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 ?? ""
|
|
1060
1075
|
});
|
|
1061
1076
|
const updateFormData = (nextData) => {
|
|
1062
1077
|
setFormData(nextData);
|
|
@@ -1183,6 +1198,7 @@ var RowItem = ({
|
|
|
1183
1198
|
|
|
1184
1199
|
// src/lib/applicationData.ts
|
|
1185
1200
|
var LIFE_PLAN_APPLICATION_KEY = "LifePlanApplication";
|
|
1201
|
+
var APPLICATION_DATA_CHANGE_EVENT = "lifeplan-application:change";
|
|
1186
1202
|
var createEmptyApplicationData = () => ({
|
|
1187
1203
|
personalInfo: {
|
|
1188
1204
|
firstName: "",
|
|
@@ -1227,19 +1243,57 @@ var createEmptyApplicationData = () => ({
|
|
|
1227
1243
|
healthDeclaration4: false
|
|
1228
1244
|
}
|
|
1229
1245
|
});
|
|
1230
|
-
var
|
|
1246
|
+
var getStorage = () => {
|
|
1231
1247
|
if (typeof window === "undefined") return null;
|
|
1232
1248
|
try {
|
|
1233
|
-
|
|
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);
|
|
1234
1264
|
return stored ? JSON.parse(stored) : null;
|
|
1235
1265
|
} catch {
|
|
1236
1266
|
return null;
|
|
1237
1267
|
}
|
|
1238
1268
|
};
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1241
|
-
|
|
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);
|
|
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);
|
|
1242
1294
|
};
|
|
1295
|
+
var loadApplicationDataFromLocalStorage = loadApplicationData;
|
|
1296
|
+
var saveApplicationDataToLocalStorage = saveApplicationData;
|
|
1243
1297
|
|
|
1244
1298
|
// src/NewSaleForm/beneficiary.tsx
|
|
1245
1299
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
@@ -1293,13 +1347,13 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1293
1347
|
contingent.length > 0 ? contingent[0] : void 0,
|
|
1294
1348
|
allBeneficiaries
|
|
1295
1349
|
);
|
|
1296
|
-
const currentData =
|
|
1350
|
+
const currentData = loadApplicationData() ?? createEmptyApplicationData();
|
|
1297
1351
|
const {
|
|
1298
1352
|
principalBeneficiary: _oldPrincipal,
|
|
1299
1353
|
contingentBeneficiary: _oldContingent,
|
|
1300
1354
|
...restData
|
|
1301
1355
|
} = currentData;
|
|
1302
|
-
|
|
1356
|
+
saveApplicationData({
|
|
1303
1357
|
...restData,
|
|
1304
1358
|
beneficiaries: allBeneficiaries,
|
|
1305
1359
|
...principal[0] ? { principalBeneficiary: principal[0] } : {},
|
|
@@ -1308,7 +1362,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1308
1362
|
};
|
|
1309
1363
|
(0, import_react11.useEffect)(() => {
|
|
1310
1364
|
const timeoutId = window.setTimeout(() => {
|
|
1311
|
-
const currentData =
|
|
1365
|
+
const currentData = loadApplicationData();
|
|
1312
1366
|
if (!currentData) return;
|
|
1313
1367
|
const storedBeneficiaries = currentData.beneficiaries ?? [];
|
|
1314
1368
|
let principalFromStorage = storedBeneficiaries.filter(
|
|
@@ -1961,29 +2015,18 @@ var HealthDeclaration = () => {
|
|
|
1961
2015
|
healthDeclaration3: false,
|
|
1962
2016
|
healthDeclaration4: false
|
|
1963
2017
|
});
|
|
2018
|
+
const [hydrated, setHydrated] = (0, import_react12.useState)(false);
|
|
1964
2019
|
(0, import_react12.useEffect)(() => {
|
|
1965
|
-
|
|
1966
|
-
if (
|
|
1967
|
-
appData = createEmptyApplicationData();
|
|
1968
|
-
saveApplicationDataToLocalStorage(appData);
|
|
1969
|
-
}
|
|
1970
|
-
if (appData && appData.healthDeclaration) {
|
|
2020
|
+
const appData = loadApplicationData();
|
|
2021
|
+
if (appData?.healthDeclaration) {
|
|
1971
2022
|
setHealthDeclarationValues(appData.healthDeclaration);
|
|
1972
2023
|
}
|
|
2024
|
+
setHydrated(true);
|
|
1973
2025
|
}, []);
|
|
1974
2026
|
(0, import_react12.useEffect)(() => {
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
appData.healthDeclaration = healthDeclarationValues;
|
|
1979
|
-
saveApplicationDataToLocalStorage(appData);
|
|
1980
|
-
console.log(
|
|
1981
|
-
"Health Declaration saved to localStorage",
|
|
1982
|
-
healthDeclarationValues
|
|
1983
|
-
);
|
|
1984
|
-
}
|
|
1985
|
-
};
|
|
1986
|
-
}, [healthDeclarationValues]);
|
|
2027
|
+
if (!hydrated) return;
|
|
2028
|
+
updateApplicationData({ healthDeclaration: healthDeclarationValues });
|
|
2029
|
+
}, [healthDeclarationValues, hydrated]);
|
|
1987
2030
|
const items = [
|
|
1988
2031
|
{
|
|
1989
2032
|
value: "first-item",
|
|
@@ -2299,7 +2342,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2299
2342
|
const [openSections, setOpenSections] = (0, import_react18.useState)(["personal"]);
|
|
2300
2343
|
(0, import_react18.useEffect)(() => {
|
|
2301
2344
|
const timeoutId = window.setTimeout(() => {
|
|
2302
|
-
const saved =
|
|
2345
|
+
const saved = loadApplicationData();
|
|
2303
2346
|
if (saved) setApplicationData(saved);
|
|
2304
2347
|
setHydrated(true);
|
|
2305
2348
|
}, 0);
|
|
@@ -2307,7 +2350,11 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2307
2350
|
}, []);
|
|
2308
2351
|
(0, import_react18.useEffect)(() => {
|
|
2309
2352
|
if (!hydrated) return;
|
|
2310
|
-
|
|
2353
|
+
updateApplicationData({
|
|
2354
|
+
personalInfo: applicationData.personalInfo,
|
|
2355
|
+
address: applicationData.address,
|
|
2356
|
+
employment: applicationData.employment
|
|
2357
|
+
});
|
|
2311
2358
|
}, [applicationData, hydrated]);
|
|
2312
2359
|
const isComplete = isPersonalComplete(applicationData.personalInfo) && isAddressComplete(applicationData.address);
|
|
2313
2360
|
(0, import_react18.useEffect)(() => {
|
|
@@ -2368,6 +2415,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2368
2415
|
page: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2369
2416
|
LifePlanApplication2_default,
|
|
2370
2417
|
{
|
|
2418
|
+
initialData: applicationData.address,
|
|
2371
2419
|
onAddressUpdate: handleAddressUpdate,
|
|
2372
2420
|
...parseAddress ? { parseAddress } : {}
|
|
2373
2421
|
}
|
|
@@ -2395,6 +2443,7 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2395
2443
|
(prev) => prev.includes(value) ? prev.filter((sectionValue) => sectionValue !== value) : [...prev, value]
|
|
2396
2444
|
);
|
|
2397
2445
|
};
|
|
2446
|
+
if (!hydrated) return null;
|
|
2398
2447
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react17.Box, { w: "full", children: [
|
|
2399
2448
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2400
2449
|
import_react17.Flex,
|
|
@@ -2444,21 +2493,21 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2444
2493
|
var LifePlanApplicationFormWrapper_default = LifePlanApplicationFormWrapper;
|
|
2445
2494
|
|
|
2446
2495
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
2447
|
-
var
|
|
2448
|
-
var
|
|
2496
|
+
var import_react27 = require("@chakra-ui/react");
|
|
2497
|
+
var import_react28 = require("react");
|
|
2449
2498
|
|
|
2450
2499
|
// src/NewSaleForm/data/lifePlanSteps.tsx
|
|
2451
2500
|
var import_fa4 = require("react-icons/fa");
|
|
2452
2501
|
var import_io3 = require("react-icons/io");
|
|
2453
2502
|
|
|
2454
2503
|
// src/NewSaleForm/confirmation.tsx
|
|
2455
|
-
var
|
|
2504
|
+
var import_react23 = require("@chakra-ui/react");
|
|
2456
2505
|
var import_st_peter_ui6 = require("st-peter-ui");
|
|
2457
2506
|
var import_fa6 = require("react-icons/fa6");
|
|
2458
2507
|
var import_fa3 = require("react-icons/fa");
|
|
2459
2508
|
var import_io2 = require("react-icons/io");
|
|
2460
2509
|
var import_fi = require("react-icons/fi");
|
|
2461
|
-
var
|
|
2510
|
+
var import_react24 = require("react");
|
|
2462
2511
|
|
|
2463
2512
|
// src/NewSaleForm/data/checkBoxList.tsx
|
|
2464
2513
|
var import_react19 = require("@chakra-ui/react");
|
|
@@ -2561,9 +2610,22 @@ var checkboxList = [
|
|
|
2561
2610
|
}
|
|
2562
2611
|
];
|
|
2563
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
|
+
|
|
2564
2626
|
// src/NewSaleForm/ui/info-card-accordion.tsx
|
|
2565
|
-
var
|
|
2566
|
-
var
|
|
2627
|
+
var import_react21 = require("@chakra-ui/react");
|
|
2628
|
+
var import_react22 = require("react");
|
|
2567
2629
|
var import_lu4 = require("react-icons/lu");
|
|
2568
2630
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2569
2631
|
function InfoCardAccordion({
|
|
@@ -2577,7 +2639,7 @@ function InfoCardAccordion({
|
|
|
2577
2639
|
onToggle,
|
|
2578
2640
|
onEdit
|
|
2579
2641
|
}) {
|
|
2580
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2642
|
+
const [internalOpen, setInternalOpen] = (0, import_react22.useState)(defaultOpen);
|
|
2581
2643
|
const isControlled = controlledOpen !== void 0;
|
|
2582
2644
|
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
2583
2645
|
const toggle = () => {
|
|
@@ -2595,7 +2657,7 @@ function InfoCardAccordion({
|
|
|
2595
2657
|
};
|
|
2596
2658
|
const activeIcon = isOpen && openedIcon ? openedIcon : icon;
|
|
2597
2659
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2598
|
-
|
|
2660
|
+
import_react21.Box,
|
|
2599
2661
|
{
|
|
2600
2662
|
w: "full",
|
|
2601
2663
|
position: "relative",
|
|
@@ -2609,7 +2671,7 @@ function InfoCardAccordion({
|
|
|
2609
2671
|
cursor: "pointer",
|
|
2610
2672
|
children: [
|
|
2611
2673
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2612
|
-
|
|
2674
|
+
import_react21.Flex,
|
|
2613
2675
|
{
|
|
2614
2676
|
align: "center",
|
|
2615
2677
|
justify: "space-between",
|
|
@@ -2624,9 +2686,9 @@ function InfoCardAccordion({
|
|
|
2624
2686
|
_hover: { bg: "gray.50" },
|
|
2625
2687
|
transition: "background 0.15s ease",
|
|
2626
2688
|
children: [
|
|
2627
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Flex, { align: "center", gap: 2, children: [
|
|
2628
2690
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2629
|
-
|
|
2691
|
+
import_react21.Box,
|
|
2630
2692
|
{
|
|
2631
2693
|
p: 2,
|
|
2632
2694
|
borderRadius: "full",
|
|
@@ -2636,17 +2698,17 @@ function InfoCardAccordion({
|
|
|
2636
2698
|
children: activeIcon
|
|
2637
2699
|
}
|
|
2638
2700
|
),
|
|
2639
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2640
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2641
|
-
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: [
|
|
2642
2704
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lu4.LuHash, { size: 12 }),
|
|
2643
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Text, { children: subtitle })
|
|
2644
2706
|
] })
|
|
2645
2707
|
] })
|
|
2646
2708
|
] }),
|
|
2647
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react21.Flex, { align: "center", gap: 1, flexShrink: 0, children: [
|
|
2648
2710
|
onEdit && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2649
|
-
|
|
2711
|
+
import_react21.Button,
|
|
2650
2712
|
{
|
|
2651
2713
|
variant: "ghost",
|
|
2652
2714
|
p: 0,
|
|
@@ -2658,15 +2720,15 @@ function InfoCardAccordion({
|
|
|
2658
2720
|
e.stopPropagation();
|
|
2659
2721
|
onEdit();
|
|
2660
2722
|
},
|
|
2661
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react21.Icon, { as: import_lu4.LuPencil, boxSize: 4 })
|
|
2662
2724
|
}
|
|
2663
2725
|
),
|
|
2664
|
-
/* @__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 }) })
|
|
2665
2727
|
] })
|
|
2666
2728
|
]
|
|
2667
2729
|
}
|
|
2668
2730
|
),
|
|
2669
|
-
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 })
|
|
2670
2732
|
]
|
|
2671
2733
|
}
|
|
2672
2734
|
);
|
|
@@ -2690,14 +2752,20 @@ var modeLabel = (mode) => {
|
|
|
2690
2752
|
return mode || "-";
|
|
2691
2753
|
}
|
|
2692
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";
|
|
2693
2761
|
var ApplicationAccordion = ({
|
|
2694
2762
|
items,
|
|
2695
2763
|
onEdit
|
|
2696
2764
|
}) => {
|
|
2697
|
-
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)(
|
|
2698
2766
|
InfoCardAccordion,
|
|
2699
2767
|
{
|
|
2700
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2768
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: item.icon, boxSize: "18px" }),
|
|
2701
2769
|
title: item.label,
|
|
2702
2770
|
...item.subtitle !== void 0 ? { subtitle: item.subtitle } : {},
|
|
2703
2771
|
defaultOpen: index === 0,
|
|
@@ -2709,13 +2777,13 @@ var ApplicationAccordion = ({
|
|
|
2709
2777
|
};
|
|
2710
2778
|
var ReviewRows2 = ({
|
|
2711
2779
|
rows
|
|
2712
|
-
}) => /* @__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)) });
|
|
2713
2781
|
var FieldGrid = ({
|
|
2714
2782
|
rows
|
|
2715
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2716
|
-
/* @__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 }),
|
|
2717
2785
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2718
|
-
|
|
2786
|
+
import_react23.Text,
|
|
2719
2787
|
{
|
|
2720
2788
|
fontSize: "sm",
|
|
2721
2789
|
fontWeight: "600",
|
|
@@ -2730,7 +2798,7 @@ var SectionCard = ({
|
|
|
2730
2798
|
onEdit,
|
|
2731
2799
|
children
|
|
2732
2800
|
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2733
|
-
|
|
2801
|
+
import_react23.Box,
|
|
2734
2802
|
{
|
|
2735
2803
|
css: { breakInside: "avoid" },
|
|
2736
2804
|
mb: 6,
|
|
@@ -2741,10 +2809,10 @@ var SectionCard = ({
|
|
|
2741
2809
|
boxShadow: "sm",
|
|
2742
2810
|
p: 6,
|
|
2743
2811
|
children: [
|
|
2744
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2745
|
-
/* @__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 }),
|
|
2746
2814
|
onEdit ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2747
|
-
|
|
2815
|
+
import_react23.IconButton,
|
|
2748
2816
|
{
|
|
2749
2817
|
"aria-label": `Edit ${title}`,
|
|
2750
2818
|
size: "sm",
|
|
@@ -2761,23 +2829,18 @@ var SectionCard = ({
|
|
|
2761
2829
|
}
|
|
2762
2830
|
);
|
|
2763
2831
|
var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
2764
|
-
const [cartItems, setCartItems] = (0,
|
|
2765
|
-
const
|
|
2766
|
-
const [openDialog, setOpenDialog] = (0,
|
|
2767
|
-
const [pendingCheck, setPendingCheck] = (0,
|
|
2768
|
-
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)(
|
|
2769
2837
|
() => checkboxList.map(() => false)
|
|
2770
2838
|
);
|
|
2771
|
-
(0,
|
|
2839
|
+
(0, import_react24.useEffect)(() => {
|
|
2772
2840
|
const loadStoredData = () => {
|
|
2773
2841
|
try {
|
|
2774
2842
|
const checkoutStored = sessionStorage.getItem("CheckoutCart");
|
|
2775
2843
|
const cartStored = sessionStorage.getItem("Cart");
|
|
2776
|
-
const lifePlanApplicationStored = localStorage.getItem(
|
|
2777
|
-
"LifePlanApplication"
|
|
2778
|
-
);
|
|
2779
|
-
const parsedApplicationData = lifePlanApplicationStored ? JSON.parse(lifePlanApplicationStored) : null;
|
|
2780
|
-
setLifePlanApplication(parsedApplicationData);
|
|
2781
2844
|
if (checkoutStored) {
|
|
2782
2845
|
const parsedCheckout = JSON.parse(checkoutStored);
|
|
2783
2846
|
setCartItems(
|
|
@@ -2803,23 +2866,18 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2803
2866
|
const acceptedCount = acceptedAgreements.filter(Boolean).length;
|
|
2804
2867
|
const allAccepted = checkboxList.length > 0 && acceptedCount === checkboxList.length;
|
|
2805
2868
|
const pendingAgreement = pendingCheck !== null ? checkboxList[pendingCheck] : null;
|
|
2806
|
-
(0,
|
|
2869
|
+
(0, import_react24.useEffect)(() => {
|
|
2807
2870
|
onAllAcceptedChange?.(allAccepted);
|
|
2808
2871
|
}, [allAccepted, onAllAcceptedChange]);
|
|
2809
|
-
const beneficiaries = [
|
|
2810
|
-
{
|
|
2811
|
-
name: "
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
relationship: "Relative",
|
|
2819
|
-
dob: "1992-04-15",
|
|
2820
|
-
address: "Sample Avenue, Sample District, Sample City"
|
|
2821
|
-
}
|
|
2822
|
-
];
|
|
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
|
+
);
|
|
2823
2881
|
const confirmAgreement = () => {
|
|
2824
2882
|
if (pendingCheck === null) return;
|
|
2825
2883
|
setAcceptedAgreements((prev) => {
|
|
@@ -2838,83 +2896,62 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2838
2896
|
value: selectedPlan ? `\u20B1 ${selectedPlan.total}` : void 0
|
|
2839
2897
|
}
|
|
2840
2898
|
];
|
|
2899
|
+
const personal = lifePlanApplication?.personalInfo;
|
|
2900
|
+
const address = lifePlanApplication?.address;
|
|
2901
|
+
const employment = lifePlanApplication?.employment;
|
|
2841
2902
|
const personalRows = [
|
|
2842
|
-
{ label: "Uploaded ID", value:
|
|
2843
|
-
{ label: "
|
|
2844
|
-
{ label: "
|
|
2845
|
-
{
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
},
|
|
2849
|
-
{ label: "
|
|
2850
|
-
{
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
},
|
|
2854
|
-
{ label: "
|
|
2855
|
-
{
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
},
|
|
2859
|
-
{ label: "Email", value: lifePlanApplication?.personalInfo.emailAddress },
|
|
2860
|
-
{
|
|
2861
|
-
label: "Landline Number",
|
|
2862
|
-
value: lifePlanApplication?.personalInfo.landLineNumber
|
|
2863
|
-
},
|
|
2864
|
-
{
|
|
2865
|
-
label: "Mailing Address",
|
|
2866
|
-
value: lifePlanApplication?.personalInfo.mailingAddress
|
|
2867
|
-
},
|
|
2868
|
-
{
|
|
2869
|
-
label: "Civil Status",
|
|
2870
|
-
value: lifePlanApplication?.personalInfo.civilStatus
|
|
2871
|
-
}
|
|
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) }
|
|
2872
2919
|
];
|
|
2873
2920
|
const addressRows = [
|
|
2874
|
-
{ label: "Lot #", value:
|
|
2875
|
-
{ label: "Street", value:
|
|
2876
|
-
{ label: "Barangay", value:
|
|
2877
|
-
{ label: "
|
|
2878
|
-
{ 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) }
|
|
2879
2927
|
];
|
|
2880
2928
|
const employmentRows = [
|
|
2881
|
-
{ label: "Occupation", value:
|
|
2882
|
-
{
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
},
|
|
2886
|
-
{
|
|
2887
|
-
|
|
2888
|
-
value: lifePlanApplication?.employment.employmentStatus
|
|
2889
|
-
},
|
|
2890
|
-
{
|
|
2891
|
-
label: "Office Address",
|
|
2892
|
-
value: lifePlanApplication?.employment.officeAddress
|
|
2893
|
-
},
|
|
2894
|
-
{ label: "TIN", value: lifePlanApplication?.employment.TIN },
|
|
2895
|
-
{ label: "SSS/GSIS", value: lifePlanApplication?.employment.SSS },
|
|
2896
|
-
{
|
|
2897
|
-
label: "Source of Income",
|
|
2898
|
-
value: lifePlanApplication?.employment.sourceOfIncome
|
|
2899
|
-
}
|
|
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) }
|
|
2900
2936
|
];
|
|
2901
|
-
const beneficiaryItems = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2902
|
-
/* @__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) ?? "-" }),
|
|
2903
2939
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2904
2940
|
ReviewRows2,
|
|
2905
2941
|
{
|
|
2906
2942
|
rows: [
|
|
2907
|
-
{ label: "
|
|
2908
|
-
{ label: "
|
|
2909
|
-
{ 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) }
|
|
2910
2947
|
]
|
|
2911
2948
|
}
|
|
2912
2949
|
)
|
|
2913
2950
|
] }, `${beneficiary.name}-${index}`)) });
|
|
2914
|
-
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) => {
|
|
2915
2952
|
const isAccepted = acceptedAgreements[index];
|
|
2916
2953
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2917
|
-
|
|
2954
|
+
import_react23.Box,
|
|
2918
2955
|
{
|
|
2919
2956
|
role: "button",
|
|
2920
2957
|
tabIndex: 0,
|
|
@@ -2935,16 +2972,16 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2935
2972
|
setOpenDialog(true);
|
|
2936
2973
|
}
|
|
2937
2974
|
},
|
|
2938
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2939
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2940
|
-
/* @__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: [
|
|
2941
2978
|
item.checkBoxTitle,
|
|
2942
2979
|
"."
|
|
2943
2980
|
] }),
|
|
2944
|
-
/* @__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." })
|
|
2945
2982
|
] }),
|
|
2946
2983
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2947
|
-
|
|
2984
|
+
import_react23.Badge,
|
|
2948
2985
|
{
|
|
2949
2986
|
variant: "subtle",
|
|
2950
2987
|
colorPalette: isAccepted ? "green" : "gray",
|
|
@@ -2956,12 +2993,12 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
2956
2993
|
index
|
|
2957
2994
|
);
|
|
2958
2995
|
}) });
|
|
2959
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2960
|
-
/* @__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: [
|
|
2961
2998
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2962
2999
|
InfoCardAccordion,
|
|
2963
3000
|
{
|
|
2964
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3001
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
2965
3002
|
title: "Order Summary",
|
|
2966
3003
|
subtitle: modeLabel(selectedPlan?.mode),
|
|
2967
3004
|
defaultOpen: true,
|
|
@@ -3001,7 +3038,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3001
3038
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3002
3039
|
InfoCardAccordion,
|
|
3003
3040
|
{
|
|
3004
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3041
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_fa3.FaRegUser, boxSize: "18px" }),
|
|
3005
3042
|
title: "Beneficiaries",
|
|
3006
3043
|
subtitle: `${beneficiaries.length} listed`,
|
|
3007
3044
|
children: beneficiaryItems
|
|
@@ -3010,7 +3047,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3010
3047
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3011
3048
|
InfoCardAccordion,
|
|
3012
3049
|
{
|
|
3013
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3050
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react23.Icon, { as: import_io2.IoIosInformationCircleOutline, boxSize: "18px" }),
|
|
3014
3051
|
title: "Agreements",
|
|
3015
3052
|
subtitle: `${acceptedCount}/${checkboxList.length} accepted`,
|
|
3016
3053
|
children: agreementItems
|
|
@@ -3018,7 +3055,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3018
3055
|
)
|
|
3019
3056
|
] }) }),
|
|
3020
3057
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3021
|
-
|
|
3058
|
+
import_react23.Box,
|
|
3022
3059
|
{
|
|
3023
3060
|
display: { base: "none", lg: "block" },
|
|
3024
3061
|
css: { columnCount: 2, columnGap: "24px" },
|
|
@@ -3036,7 +3073,7 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3036
3073
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Employment", onEdit: () => onEdit?.("employment"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldGrid, { rows: employmentRows }) }),
|
|
3037
3074
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SectionCard, { title: "Beneficiaries", children: beneficiaryItems }),
|
|
3038
3075
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(SectionCard, { title: "Agreements", children: [
|
|
3039
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3076
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react23.Text, { fontSize: "xs", color: "gray.500", mb: 4, children: [
|
|
3040
3077
|
acceptedCount,
|
|
3041
3078
|
"/",
|
|
3042
3079
|
checkboxList.length,
|
|
@@ -3048,29 +3085,29 @@ var Confirmation = ({ onAllAcceptedChange, onEdit }) => {
|
|
|
3048
3085
|
}
|
|
3049
3086
|
),
|
|
3050
3087
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3051
|
-
|
|
3088
|
+
import_react23.Dialog.Root,
|
|
3052
3089
|
{
|
|
3053
3090
|
open: openDialog,
|
|
3054
3091
|
onOpenChange: (details) => setOpenDialog(details.open),
|
|
3055
3092
|
size: { mdDown: "full", md: "xl" },
|
|
3056
3093
|
scrollBehavior: "inside",
|
|
3057
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
3058
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3059
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3060
|
-
|
|
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,
|
|
3061
3098
|
{
|
|
3062
3099
|
bg: "white",
|
|
3063
3100
|
rounded: "xl",
|
|
3064
3101
|
shadow: "lg",
|
|
3065
3102
|
overflow: "hidden",
|
|
3066
3103
|
children: [
|
|
3067
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3068
|
-
/* @__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: [
|
|
3069
3106
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_st_peter_ui6.H3, { children: pendingCheck !== null ? pendingAgreement?.title || "Agreement" : "Agreement" }),
|
|
3070
|
-
/* @__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." })
|
|
3071
3108
|
] }),
|
|
3072
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3073
|
-
/* @__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: [
|
|
3074
3111
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3075
3112
|
import_st_peter_ui6.CancelButton,
|
|
3076
3113
|
{
|
|
@@ -3159,8 +3196,8 @@ var createLifePlanSteps = (confirmationProps) => [
|
|
|
3159
3196
|
];
|
|
3160
3197
|
|
|
3161
3198
|
// src/NewSaleForm/ui/horizontal-stepper.tsx
|
|
3162
|
-
var
|
|
3163
|
-
var
|
|
3199
|
+
var import_react25 = require("react");
|
|
3200
|
+
var import_react26 = require("@chakra-ui/react");
|
|
3164
3201
|
var import_st_peter_ui7 = require("st-peter-ui");
|
|
3165
3202
|
var import_lu5 = require("react-icons/lu");
|
|
3166
3203
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
@@ -3178,9 +3215,9 @@ var HorizontalStepper = ({
|
|
|
3178
3215
|
nextDisabled,
|
|
3179
3216
|
submitButtonText = "Proceed To Payment"
|
|
3180
3217
|
}) => {
|
|
3181
|
-
const [localActiveStep, setLocalActiveStep] = (0,
|
|
3218
|
+
const [localActiveStep, setLocalActiveStep] = (0, import_react25.useState)(0);
|
|
3182
3219
|
const activeStep = controlledActiveStep !== void 0 ? controlledActiveStep : localActiveStep;
|
|
3183
|
-
const formTopRef = (0,
|
|
3220
|
+
const formTopRef = (0, import_react25.useRef)(null);
|
|
3184
3221
|
const isCompact = steps.length < 3;
|
|
3185
3222
|
const isLastStep = activeStep === steps.length - 1;
|
|
3186
3223
|
const nextStepTitle = steps[activeStep + 1]?.title;
|
|
@@ -3204,7 +3241,7 @@ var HorizontalStepper = ({
|
|
|
3204
3241
|
handleStepChange(Math.min(activeStep + 1, steps.length - 1));
|
|
3205
3242
|
};
|
|
3206
3243
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3207
|
-
|
|
3244
|
+
import_react26.Flex,
|
|
3208
3245
|
{
|
|
3209
3246
|
direction: "column",
|
|
3210
3247
|
align: "start",
|
|
@@ -3213,10 +3250,10 @@ var HorizontalStepper = ({
|
|
|
3213
3250
|
overflow: "visible",
|
|
3214
3251
|
pb: { base: "12px", md: "0px" },
|
|
3215
3252
|
children: [
|
|
3216
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3217
|
-
(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: [
|
|
3218
3255
|
title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3219
|
-
|
|
3256
|
+
import_react26.Box,
|
|
3220
3257
|
{
|
|
3221
3258
|
as: "h1",
|
|
3222
3259
|
m: "0",
|
|
@@ -3232,10 +3269,10 @@ var HorizontalStepper = ({
|
|
|
3232
3269
|
children: title
|
|
3233
3270
|
}
|
|
3234
3271
|
),
|
|
3235
|
-
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 })
|
|
3236
3273
|
] }),
|
|
3237
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3238
|
-
|
|
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,
|
|
3239
3276
|
{
|
|
3240
3277
|
step: activeStep,
|
|
3241
3278
|
onStepChange: (index) => handleStepChange(index.step),
|
|
@@ -3244,7 +3281,7 @@ var HorizontalStepper = ({
|
|
|
3244
3281
|
colorPalette: "green",
|
|
3245
3282
|
children: [
|
|
3246
3283
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3247
|
-
|
|
3284
|
+
import_react26.Box,
|
|
3248
3285
|
{
|
|
3249
3286
|
position: "sticky",
|
|
3250
3287
|
top: 0,
|
|
@@ -3259,7 +3296,7 @@ var HorizontalStepper = ({
|
|
|
3259
3296
|
boxShadow: "0 2px 8px -2px rgba(0,0,0,0.06)",
|
|
3260
3297
|
children: [
|
|
3261
3298
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3262
|
-
|
|
3299
|
+
import_react26.Steps.List,
|
|
3263
3300
|
{
|
|
3264
3301
|
py: 0,
|
|
3265
3302
|
flexDirection: "row",
|
|
@@ -3270,7 +3307,7 @@ var HorizontalStepper = ({
|
|
|
3270
3307
|
const isCompleted = index < activeStep;
|
|
3271
3308
|
const isActive = index === activeStep;
|
|
3272
3309
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3273
|
-
|
|
3310
|
+
import_react26.Steps.Item,
|
|
3274
3311
|
{
|
|
3275
3312
|
index,
|
|
3276
3313
|
title: step.title,
|
|
@@ -3278,7 +3315,7 @@ var HorizontalStepper = ({
|
|
|
3278
3315
|
flex: isCompact ? "0 0 auto" : "1",
|
|
3279
3316
|
children: [
|
|
3280
3317
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3281
|
-
|
|
3318
|
+
import_react26.Steps.Trigger,
|
|
3282
3319
|
{
|
|
3283
3320
|
flexDirection: isCompact ? "row" : "column",
|
|
3284
3321
|
alignItems: "center",
|
|
@@ -3290,7 +3327,7 @@ var HorizontalStepper = ({
|
|
|
3290
3327
|
_hover: { bg: "gray.50" },
|
|
3291
3328
|
children: [
|
|
3292
3329
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3293
|
-
|
|
3330
|
+
import_react26.Steps.Indicator,
|
|
3294
3331
|
{
|
|
3295
3332
|
borderWidth: "2px",
|
|
3296
3333
|
transition: "all 0.25s",
|
|
@@ -3300,11 +3337,11 @@ var HorizontalStepper = ({
|
|
|
3300
3337
|
color: isCompleted ? "white" : isActive ? PRIMARY : void 0,
|
|
3301
3338
|
boxShadow: isActive ? `0 0 0 3px ${PRIMARY_DISABLED}` : "none"
|
|
3302
3339
|
},
|
|
3303
|
-
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
|
|
3304
3341
|
}
|
|
3305
3342
|
),
|
|
3306
3343
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3307
|
-
|
|
3344
|
+
import_react26.Steps.Title,
|
|
3308
3345
|
{
|
|
3309
3346
|
fontSize: { base: "xs", md: "sm" },
|
|
3310
3347
|
textAlign: isCompact ? "left" : "center",
|
|
@@ -3320,7 +3357,7 @@ var HorizontalStepper = ({
|
|
|
3320
3357
|
}
|
|
3321
3358
|
),
|
|
3322
3359
|
!isCompact && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3323
|
-
|
|
3360
|
+
import_react26.Steps.Separator,
|
|
3324
3361
|
{
|
|
3325
3362
|
display: { base: "none", md: "block" }
|
|
3326
3363
|
}
|
|
@@ -3333,7 +3370,7 @@ var HorizontalStepper = ({
|
|
|
3333
3370
|
}
|
|
3334
3371
|
),
|
|
3335
3372
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3336
|
-
|
|
3373
|
+
import_react26.Box,
|
|
3337
3374
|
{
|
|
3338
3375
|
w: "full",
|
|
3339
3376
|
h: "3px",
|
|
@@ -3342,7 +3379,7 @@ var HorizontalStepper = ({
|
|
|
3342
3379
|
overflow: "hidden",
|
|
3343
3380
|
mt: 1,
|
|
3344
3381
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3345
|
-
|
|
3382
|
+
import_react26.Box,
|
|
3346
3383
|
{
|
|
3347
3384
|
h: "full",
|
|
3348
3385
|
bg: PRIMARY,
|
|
@@ -3355,9 +3392,9 @@ var HorizontalStepper = ({
|
|
|
3355
3392
|
]
|
|
3356
3393
|
}
|
|
3357
3394
|
),
|
|
3358
|
-
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)),
|
|
3359
3396
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3360
|
-
|
|
3397
|
+
import_react26.Flex,
|
|
3361
3398
|
{
|
|
3362
3399
|
w: "full",
|
|
3363
3400
|
justify: "space-between",
|
|
@@ -3366,8 +3403,8 @@ var HorizontalStepper = ({
|
|
|
3366
3403
|
gap: 2,
|
|
3367
3404
|
display: { base: "flex", md: "none" },
|
|
3368
3405
|
children: [
|
|
3369
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3370
|
-
|
|
3406
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react26.Steps.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3407
|
+
import_react26.Box,
|
|
3371
3408
|
{
|
|
3372
3409
|
as: "button",
|
|
3373
3410
|
display: "flex",
|
|
@@ -3393,7 +3430,7 @@ var HorizontalStepper = ({
|
|
|
3393
3430
|
}
|
|
3394
3431
|
) }),
|
|
3395
3432
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3396
|
-
|
|
3433
|
+
import_react26.Box,
|
|
3397
3434
|
{
|
|
3398
3435
|
as: "button",
|
|
3399
3436
|
display: "flex",
|
|
@@ -3418,7 +3455,7 @@ var HorizontalStepper = ({
|
|
|
3418
3455
|
]
|
|
3419
3456
|
}
|
|
3420
3457
|
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3421
|
-
|
|
3458
|
+
import_react26.Box,
|
|
3422
3459
|
{
|
|
3423
3460
|
as: "button",
|
|
3424
3461
|
display: "flex",
|
|
@@ -3447,18 +3484,18 @@ var HorizontalStepper = ({
|
|
|
3447
3484
|
}
|
|
3448
3485
|
),
|
|
3449
3486
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3450
|
-
|
|
3487
|
+
import_react26.ButtonGroup,
|
|
3451
3488
|
{
|
|
3452
3489
|
size: "sm",
|
|
3453
3490
|
variant: "outline",
|
|
3454
3491
|
display: { base: "none", md: "flex" },
|
|
3455
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3456
|
-
/* @__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: [
|
|
3457
3494
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu5.LuChevronLeft, {}),
|
|
3458
3495
|
"Previous"
|
|
3459
3496
|
] }) }),
|
|
3460
3497
|
!isLastStep ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3461
|
-
|
|
3498
|
+
import_react26.Box,
|
|
3462
3499
|
{
|
|
3463
3500
|
as: "button",
|
|
3464
3501
|
display: "flex",
|
|
@@ -3496,8 +3533,131 @@ var HorizontalStepper = ({
|
|
|
3496
3533
|
};
|
|
3497
3534
|
var horizontal_stepper_default = HorizontalStepper;
|
|
3498
3535
|
|
|
3536
|
+
// src/services/MainAPIClient.ts
|
|
3537
|
+
var import_axios = __toESM(require("axios"));
|
|
3538
|
+
var APIError = class extends Error {
|
|
3539
|
+
status;
|
|
3540
|
+
constructor(message, status) {
|
|
3541
|
+
super(message);
|
|
3542
|
+
this.name = "APIError";
|
|
3543
|
+
this.status = status;
|
|
3544
|
+
}
|
|
3545
|
+
};
|
|
3546
|
+
var readEnvBaseUrl = () => {
|
|
3547
|
+
try {
|
|
3548
|
+
return process.env.NEXT_PUBLIC_API_URL;
|
|
3549
|
+
} catch {
|
|
3550
|
+
return void 0;
|
|
3551
|
+
}
|
|
3552
|
+
};
|
|
3553
|
+
var apiClient = import_axios.default.create({
|
|
3554
|
+
baseURL: readEnvBaseUrl() ?? "",
|
|
3555
|
+
timeout: 15e3,
|
|
3556
|
+
headers: {
|
|
3557
|
+
"Content-Type": "application/json"
|
|
3558
|
+
}
|
|
3559
|
+
});
|
|
3560
|
+
var configureApi = (options) => {
|
|
3561
|
+
apiClient.defaults.baseURL = options.baseUrl;
|
|
3562
|
+
};
|
|
3563
|
+
apiClient.interceptors.request.use((config) => {
|
|
3564
|
+
if (!config.baseURL) {
|
|
3565
|
+
throw new APIError(
|
|
3566
|
+
"API URL is not set. Add NEXT_PUBLIC_API_URL to .env.local or call configureApi({ baseUrl })."
|
|
3567
|
+
);
|
|
3568
|
+
}
|
|
3569
|
+
return config;
|
|
3570
|
+
});
|
|
3571
|
+
apiClient.interceptors.response.use(
|
|
3572
|
+
(response) => response,
|
|
3573
|
+
(error) => {
|
|
3574
|
+
if (error instanceof APIError) return Promise.reject(error);
|
|
3575
|
+
const status = error.response?.status;
|
|
3576
|
+
const message = error.response?.data?.message || error.message || "Something went wrong";
|
|
3577
|
+
console.error(`[API] ${error.config?.method?.toUpperCase()} ${error.config?.url} failed (${status ?? "no response"}):`, message);
|
|
3578
|
+
return Promise.reject(new APIError(message, status));
|
|
3579
|
+
}
|
|
3580
|
+
);
|
|
3581
|
+
var api = {
|
|
3582
|
+
get: (url, params, config) => apiClient.get(url, { ...config, params }).then((res) => res.data),
|
|
3583
|
+
post: (url, payload, config) => apiClient.post(url, payload, config).then((res) => res.data),
|
|
3584
|
+
put: (url, payload, config) => apiClient.put(url, payload, config).then((res) => res.data),
|
|
3585
|
+
delete: (url, config) => apiClient.delete(url, config).then((res) => res.data)
|
|
3586
|
+
};
|
|
3587
|
+
|
|
3588
|
+
// src/services/GeoApifyService.ts
|
|
3589
|
+
var ENDPOINTS = {
|
|
3590
|
+
parse: "/Address/Parse"
|
|
3591
|
+
};
|
|
3592
|
+
var GeoApifyService = {
|
|
3593
|
+
async parseAddress(text) {
|
|
3594
|
+
return api.get(ENDPOINTS.parse, {
|
|
3595
|
+
text: text.replace(/\s+/g, " ").trim()
|
|
3596
|
+
});
|
|
3597
|
+
}
|
|
3598
|
+
};
|
|
3599
|
+
|
|
3600
|
+
// src/services/PayMongoService.ts
|
|
3601
|
+
var ENDPOINTS2 = {
|
|
3602
|
+
checkout: "/PayMongoAPI/CreateCheckout",
|
|
3603
|
+
newSalesCheckout: "/PayMongoAPI/CreateNewSalesCheckout"
|
|
3604
|
+
};
|
|
3605
|
+
var toWholeNumber = (value) => {
|
|
3606
|
+
const n = Number(value);
|
|
3607
|
+
return value !== void 0 && value !== "" && Number.isFinite(n) ? Math.trunc(n) : void 0;
|
|
3608
|
+
};
|
|
3609
|
+
var toApiItem = (item) => ({
|
|
3610
|
+
planDesc: item.planDesc,
|
|
3611
|
+
ipInstAmt: Number(item.ipInstAmt),
|
|
3612
|
+
quantity: toWholeNumber(item.quantity) ?? 1,
|
|
3613
|
+
planTerm: toWholeNumber(item.planTerm),
|
|
3614
|
+
productCode: item.productCode,
|
|
3615
|
+
contractPrice: item.contractPrice
|
|
3616
|
+
});
|
|
3617
|
+
var PayMongoService = {
|
|
3618
|
+
async createCheckout(items) {
|
|
3619
|
+
const body = { items: items.map(toApiItem) };
|
|
3620
|
+
console.log("PayMongoService: body =", body);
|
|
3621
|
+
console.log("PayMongoService: ENDPOINTS.checkout =", ENDPOINTS2.checkout);
|
|
3622
|
+
const res = await api.post(ENDPOINTS2.checkout, body);
|
|
3623
|
+
return { checkoutUrl: res?.checkoutUrl };
|
|
3624
|
+
},
|
|
3625
|
+
async createNewSalesCheckout(request) {
|
|
3626
|
+
const body = {
|
|
3627
|
+
items: request.items.map((item) => ({
|
|
3628
|
+
planDesc: item.planDesc,
|
|
3629
|
+
mode: item.mode,
|
|
3630
|
+
ipInstAmt: Number(item.ipInstAmt),
|
|
3631
|
+
quantity: toWholeNumber(item.quantity) ?? 1,
|
|
3632
|
+
planTerm: toWholeNumber(item.planTerm)
|
|
3633
|
+
})),
|
|
3634
|
+
application: request.application,
|
|
3635
|
+
accountNo: request.accountNo ?? "",
|
|
3636
|
+
empCode: request.empCode ?? ""
|
|
3637
|
+
};
|
|
3638
|
+
const res = await api.post(
|
|
3639
|
+
ENDPOINTS2.newSalesCheckout,
|
|
3640
|
+
body,
|
|
3641
|
+
{ timeout: 6e4 }
|
|
3642
|
+
);
|
|
3643
|
+
return { checkoutUrl: res?.checkoutUrl, requestId: res?.requestId };
|
|
3644
|
+
}
|
|
3645
|
+
};
|
|
3646
|
+
|
|
3499
3647
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
3500
3648
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3649
|
+
var TEST_ACCOUNT_NO = "SPLPI-22-000021";
|
|
3650
|
+
var defaultCheckout = async ({
|
|
3651
|
+
items,
|
|
3652
|
+
application
|
|
3653
|
+
}) => {
|
|
3654
|
+
const { checkoutUrl } = await PayMongoService.createNewSalesCheckout({
|
|
3655
|
+
items,
|
|
3656
|
+
application,
|
|
3657
|
+
accountNo: TEST_ACCOUNT_NO
|
|
3658
|
+
});
|
|
3659
|
+
return checkoutUrl;
|
|
3660
|
+
};
|
|
3501
3661
|
var safeParse = (value) => {
|
|
3502
3662
|
if (!value) return null;
|
|
3503
3663
|
try {
|
|
@@ -3510,21 +3670,21 @@ var SharedLifePlanApplication = ({
|
|
|
3510
3670
|
title = "Life Plan Application",
|
|
3511
3671
|
description = "Please fill out the form below to apply for a life plan.",
|
|
3512
3672
|
onPaymentError,
|
|
3513
|
-
onCheckout,
|
|
3514
|
-
parseAddress
|
|
3673
|
+
onCheckout = defaultCheckout,
|
|
3674
|
+
parseAddress = GeoApifyService.parseAddress
|
|
3515
3675
|
}) => {
|
|
3516
|
-
const [currentStep, setCurrentStep] = (0,
|
|
3517
|
-
const [loading, setLoading] = (0,
|
|
3518
|
-
const [allAgreementsAccepted, setAllAgreementsAccepted] = (0,
|
|
3519
|
-
const [applicationSection, setApplicationSection] = (0,
|
|
3520
|
-
const [applicationSectionKey, setApplicationSectionKey] = (0,
|
|
3521
|
-
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);
|
|
3522
3682
|
const steps = createLifePlanSteps({
|
|
3523
3683
|
onAllAcceptedChange: setAllAgreementsAccepted,
|
|
3524
3684
|
...applicationSection ? { applicationSection } : {},
|
|
3525
3685
|
applicationSectionKey,
|
|
3526
3686
|
onApplicationValidChange: setApplicationValid,
|
|
3527
|
-
|
|
3687
|
+
parseAddress,
|
|
3528
3688
|
onEdit: (section) => {
|
|
3529
3689
|
setApplicationSection(section ?? "personal");
|
|
3530
3690
|
setApplicationSectionKey((key) => key + 1);
|
|
@@ -3536,9 +3696,6 @@ var SharedLifePlanApplication = ({
|
|
|
3536
3696
|
if (!allAgreementsAccepted) return;
|
|
3537
3697
|
setLoading(true);
|
|
3538
3698
|
try {
|
|
3539
|
-
if (!onCheckout) {
|
|
3540
|
-
throw new Error("onCheckout prop is not provided");
|
|
3541
|
-
}
|
|
3542
3699
|
const checkoutRaw = sessionStorage.getItem("CheckoutCart");
|
|
3543
3700
|
const cartRaw = sessionStorage.getItem("Cart");
|
|
3544
3701
|
const parsed = safeParse(checkoutRaw) ?? safeParse(cartRaw);
|
|
@@ -3546,7 +3703,7 @@ var SharedLifePlanApplication = ({
|
|
|
3546
3703
|
if (items.length === 0) {
|
|
3547
3704
|
throw new Error("No items to checkout");
|
|
3548
3705
|
}
|
|
3549
|
-
const applicationData =
|
|
3706
|
+
const applicationData = loadApplicationData() ?? createEmptyApplicationData();
|
|
3550
3707
|
const checkoutPayload = items.map((item) => ({
|
|
3551
3708
|
planDesc: item.planDesc,
|
|
3552
3709
|
mode: item.mode,
|
|
@@ -3568,7 +3725,7 @@ var SharedLifePlanApplication = ({
|
|
|
3568
3725
|
setLoading(false);
|
|
3569
3726
|
}
|
|
3570
3727
|
};
|
|
3571
|
-
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)(
|
|
3572
3729
|
horizontal_stepper_default,
|
|
3573
3730
|
{
|
|
3574
3731
|
steps,
|
|
@@ -3590,12 +3747,12 @@ var LifePlanApplicationStepWrapper = (props) => {
|
|
|
3590
3747
|
var LifePlanApplicationStepWrapper_default = LifePlanApplicationStepWrapper;
|
|
3591
3748
|
|
|
3592
3749
|
// src/hooks/useOcr.ts
|
|
3593
|
-
var
|
|
3750
|
+
var import_react29 = require("react");
|
|
3594
3751
|
function useOcr(scanIdFn) {
|
|
3595
|
-
const [data, setData] = (0,
|
|
3596
|
-
const [loading, setLoading] = (0,
|
|
3597
|
-
const [error, setError] = (0,
|
|
3598
|
-
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)(
|
|
3599
3756
|
async (file) => {
|
|
3600
3757
|
setLoading(true);
|
|
3601
3758
|
setError(null);
|
|
@@ -3619,17 +3776,17 @@ function useOcr(scanIdFn) {
|
|
|
3619
3776
|
|
|
3620
3777
|
// src/GetStarted/GetStarted.tsx
|
|
3621
3778
|
var import_st_peter_ui8 = require("st-peter-ui");
|
|
3622
|
-
var
|
|
3623
|
-
var
|
|
3779
|
+
var import_react34 = require("@chakra-ui/react");
|
|
3780
|
+
var import_react35 = require("react");
|
|
3624
3781
|
var import_lu7 = require("react-icons/lu");
|
|
3625
3782
|
|
|
3626
3783
|
// src/GetStarted/Container.tsx
|
|
3627
|
-
var
|
|
3628
|
-
var
|
|
3784
|
+
var import_react30 = require("react");
|
|
3785
|
+
var import_react31 = require("@chakra-ui/react");
|
|
3629
3786
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3630
3787
|
var Container = ({ children }) => {
|
|
3631
3788
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3632
|
-
|
|
3789
|
+
import_react31.Box,
|
|
3633
3790
|
{
|
|
3634
3791
|
px: { base: 8, md: 8 },
|
|
3635
3792
|
mt: { base: 16, md: 32 },
|
|
@@ -3643,8 +3800,8 @@ var Container = ({ children }) => {
|
|
|
3643
3800
|
var Container_default = Container;
|
|
3644
3801
|
|
|
3645
3802
|
// src/GetStarted/DocumentUploadCard.tsx
|
|
3646
|
-
var
|
|
3647
|
-
var
|
|
3803
|
+
var import_react32 = require("react");
|
|
3804
|
+
var import_react33 = require("@chakra-ui/react");
|
|
3648
3805
|
var import_lu6 = require("react-icons/lu");
|
|
3649
3806
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3650
3807
|
var PRIMARY2 = "var(--chakra-colors-primary)";
|
|
@@ -3671,9 +3828,9 @@ var validate = (file, config) => {
|
|
|
3671
3828
|
return null;
|
|
3672
3829
|
};
|
|
3673
3830
|
var useDocumentSlot = (config, onProcess, notifyError = defaultNotifyError) => {
|
|
3674
|
-
const [slot, setSlot] = (0,
|
|
3675
|
-
const timers = (0,
|
|
3676
|
-
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);
|
|
3677
3834
|
const clearTimers = () => {
|
|
3678
3835
|
timers.current.forEach(clearTimeout);
|
|
3679
3836
|
timers.current = [];
|
|
@@ -3756,7 +3913,7 @@ var Card = ({
|
|
|
3756
3913
|
headerAction,
|
|
3757
3914
|
children
|
|
3758
3915
|
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3759
|
-
|
|
3916
|
+
import_react33.Box,
|
|
3760
3917
|
{
|
|
3761
3918
|
w: "full",
|
|
3762
3919
|
borderRadius: "2xl",
|
|
@@ -3766,10 +3923,10 @@ var Card = ({
|
|
|
3766
3923
|
shadow: "sm",
|
|
3767
3924
|
overflow: "hidden",
|
|
3768
3925
|
children: [
|
|
3769
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3770
|
-
/* @__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: [
|
|
3771
3928
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3772
|
-
|
|
3929
|
+
import_react33.Box,
|
|
3773
3930
|
{
|
|
3774
3931
|
p: 2,
|
|
3775
3932
|
borderRadius: "full",
|
|
@@ -3779,14 +3936,14 @@ var Card = ({
|
|
|
3779
3936
|
children: activeIcon
|
|
3780
3937
|
}
|
|
3781
3938
|
),
|
|
3782
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3783
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3784
|
-
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 })
|
|
3785
3942
|
] })
|
|
3786
3943
|
] }),
|
|
3787
3944
|
headerAction
|
|
3788
3945
|
] }),
|
|
3789
|
-
/* @__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 })
|
|
3790
3947
|
]
|
|
3791
3948
|
}
|
|
3792
3949
|
);
|
|
@@ -3801,7 +3958,7 @@ var StatusPill = ({ status }) => {
|
|
|
3801
3958
|
const meta = map[status];
|
|
3802
3959
|
if (!meta) return null;
|
|
3803
3960
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3804
|
-
|
|
3961
|
+
import_react33.Flex,
|
|
3805
3962
|
{
|
|
3806
3963
|
align: "center",
|
|
3807
3964
|
gap: 1.5,
|
|
@@ -3813,14 +3970,14 @@ var StatusPill = ({ status }) => {
|
|
|
3813
3970
|
style: { color: meta.fg, background: meta.bg },
|
|
3814
3971
|
flexShrink: 0,
|
|
3815
3972
|
children: [
|
|
3816
|
-
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 }),
|
|
3817
3974
|
meta.label
|
|
3818
3975
|
]
|
|
3819
3976
|
}
|
|
3820
3977
|
);
|
|
3821
3978
|
};
|
|
3822
|
-
var ProgressBar = ({ value, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3823
|
-
|
|
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,
|
|
3824
3981
|
{
|
|
3825
3982
|
h: "full",
|
|
3826
3983
|
borderRadius: "full",
|
|
@@ -3837,7 +3994,7 @@ var Thumb = ({
|
|
|
3837
3994
|
fileName,
|
|
3838
3995
|
transparent
|
|
3839
3996
|
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3840
|
-
|
|
3997
|
+
import_react33.Flex,
|
|
3841
3998
|
{
|
|
3842
3999
|
align: "center",
|
|
3843
4000
|
justify: "center",
|
|
@@ -3853,9 +4010,9 @@ var Thumb = ({
|
|
|
3853
4010
|
backgroundSize: "10px 10px",
|
|
3854
4011
|
backgroundPosition: "0 0,0 5px,5px -5px,-5px 0"
|
|
3855
4012
|
} : void 0,
|
|
3856
|
-
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: [
|
|
3857
4014
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuFileText, { size: 22 }),
|
|
3858
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Text, { fontSize: "9px", fontWeight: 600, children: isPdf ? "PDF" : "FILE" })
|
|
3859
4016
|
] }) : (
|
|
3860
4017
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3861
4018
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -3882,7 +4039,7 @@ var GhostBtn = ({
|
|
|
3882
4039
|
};
|
|
3883
4040
|
const t = tones[tone];
|
|
3884
4041
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3885
|
-
|
|
4042
|
+
import_react33.Flex,
|
|
3886
4043
|
{
|
|
3887
4044
|
as: "button",
|
|
3888
4045
|
align: "center",
|
|
@@ -3916,12 +4073,12 @@ function DocumentUploadCard({
|
|
|
3916
4073
|
const notifyError = onError ?? defaultNotifyError;
|
|
3917
4074
|
const { slot, uploadDocument, retryDocument, removeDocument } = useDocumentSlot(config, onProcess, notifyError);
|
|
3918
4075
|
const status = slot?.status ?? "idle";
|
|
3919
|
-
(0,
|
|
4076
|
+
(0, import_react32.useEffect)(() => {
|
|
3920
4077
|
onStatusChange?.(status);
|
|
3921
4078
|
}, [status, onStatusChange]);
|
|
3922
|
-
const browseRef = (0,
|
|
3923
|
-
const cameraRef = (0,
|
|
3924
|
-
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);
|
|
3925
4082
|
const Icon6 = config.icon;
|
|
3926
4083
|
const isPdf = slot?.fileType === "application/pdf";
|
|
3927
4084
|
const handleFiles = (files) => {
|
|
@@ -3940,7 +4097,7 @@ function DocumentUploadCard({
|
|
|
3940
4097
|
handleFiles(e.dataTransfer.files);
|
|
3941
4098
|
};
|
|
3942
4099
|
const renderDropzone = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3943
|
-
|
|
4100
|
+
import_react33.Flex,
|
|
3944
4101
|
{
|
|
3945
4102
|
direction: "column",
|
|
3946
4103
|
align: "center",
|
|
@@ -3971,7 +4128,7 @@ function DocumentUploadCard({
|
|
|
3971
4128
|
_hover: { borderColor: PRIMARY2, bg: PRIMARY_SOFT },
|
|
3972
4129
|
children: [
|
|
3973
4130
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3974
|
-
|
|
4131
|
+
import_react33.Flex,
|
|
3975
4132
|
{
|
|
3976
4133
|
align: "center",
|
|
3977
4134
|
justify: "center",
|
|
@@ -3984,11 +4141,11 @@ function DocumentUploadCard({
|
|
|
3984
4141
|
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lu6.LuUpload, { size: 18 })
|
|
3985
4142
|
}
|
|
3986
4143
|
),
|
|
3987
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
3988
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3989
|
-
/* @__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" })
|
|
3990
4147
|
] }),
|
|
3991
|
-
/* @__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: [
|
|
3992
4149
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3993
4150
|
GhostBtn,
|
|
3994
4151
|
{
|
|
@@ -4010,13 +4167,13 @@ function DocumentUploadCard({
|
|
|
4010
4167
|
]
|
|
4011
4168
|
}
|
|
4012
4169
|
);
|
|
4013
|
-
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: [
|
|
4014
4171
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4015
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4016
|
-
/* @__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 }),
|
|
4017
4174
|
status === "uploading" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
4018
4175
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4019
|
-
|
|
4176
|
+
import_react33.Flex,
|
|
4020
4177
|
{
|
|
4021
4178
|
justify: "space-between",
|
|
4022
4179
|
fontSize: "xs",
|
|
@@ -4024,8 +4181,8 @@ function DocumentUploadCard({
|
|
|
4024
4181
|
mt: 1,
|
|
4025
4182
|
mb: 1,
|
|
4026
4183
|
children: [
|
|
4027
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4028
|
-
/* @__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: [
|
|
4029
4186
|
slot?.progress ?? 0,
|
|
4030
4187
|
"%"
|
|
4031
4188
|
] })
|
|
@@ -4033,9 +4190,9 @@ function DocumentUploadCard({
|
|
|
4033
4190
|
}
|
|
4034
4191
|
),
|
|
4035
4192
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProgressBar, { value: slot?.progress ?? 0, color: "#2563EB" })
|
|
4036
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4193
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { align: "center", gap: 2, mt: 1.5, children: [
|
|
4037
4194
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4038
|
-
|
|
4195
|
+
import_react33.Flex,
|
|
4039
4196
|
{
|
|
4040
4197
|
align: "center",
|
|
4041
4198
|
gap: 1.5,
|
|
@@ -4052,23 +4209,23 @@ function DocumentUploadCard({
|
|
|
4052
4209
|
]
|
|
4053
4210
|
}
|
|
4054
4211
|
),
|
|
4055
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4212
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react33.Spinner, { size: "xs", color: "#7C3AED", borderWidth: "2px" })
|
|
4056
4213
|
] }),
|
|
4057
|
-
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." })
|
|
4058
4215
|
] })
|
|
4059
4216
|
] });
|
|
4060
|
-
const renderFailed = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4061
|
-
/* @__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: [
|
|
4062
4219
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4063
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4064
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4065
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4066
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4067
|
-
/* @__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." })
|
|
4068
4225
|
] })
|
|
4069
4226
|
] })
|
|
4070
4227
|
] }),
|
|
4071
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4228
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4072
4229
|
slot?.file ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4073
4230
|
GhostBtn,
|
|
4074
4231
|
{
|
|
@@ -4109,8 +4266,8 @@ function DocumentUploadCard({
|
|
|
4109
4266
|
const isSignature = config.processor === "signature";
|
|
4110
4267
|
const fieldCount = slot?.extraction ? Object.values(slot.extraction).filter(Boolean).length : 0;
|
|
4111
4268
|
const displayUrl = isSignature ? slot?.cleanedImageUrl ?? slot?.previewUrl : slot?.previewUrl;
|
|
4112
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4113
|
-
/* @__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: [
|
|
4114
4271
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4115
4272
|
Thumb,
|
|
4116
4273
|
{
|
|
@@ -4120,11 +4277,11 @@ function DocumentUploadCard({
|
|
|
4120
4277
|
transparent: isSignature && !!slot?.cleanedImageUrl
|
|
4121
4278
|
}
|
|
4122
4279
|
),
|
|
4123
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4124
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4125
|
-
/* @__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) }),
|
|
4126
4283
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4127
|
-
|
|
4284
|
+
import_react33.Flex,
|
|
4128
4285
|
{
|
|
4129
4286
|
align: "center",
|
|
4130
4287
|
gap: 1.5,
|
|
@@ -4140,7 +4297,7 @@ function DocumentUploadCard({
|
|
|
4140
4297
|
)
|
|
4141
4298
|
] })
|
|
4142
4299
|
] }),
|
|
4143
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4300
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react33.Flex, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4144
4301
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4145
4302
|
GhostBtn,
|
|
4146
4303
|
{
|
|
@@ -4162,7 +4319,7 @@ function DocumentUploadCard({
|
|
|
4162
4319
|
] });
|
|
4163
4320
|
};
|
|
4164
4321
|
const requiredTag = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4165
|
-
|
|
4322
|
+
import_react33.Text,
|
|
4166
4323
|
{
|
|
4167
4324
|
fontSize: "10px",
|
|
4168
4325
|
fontWeight: 700,
|
|
@@ -4175,20 +4332,20 @@ function DocumentUploadCard({
|
|
|
4175
4332
|
children: config.required ? "REQUIRED" : "OPTIONAL"
|
|
4176
4333
|
}
|
|
4177
4334
|
);
|
|
4178
|
-
const isMobile = (0,
|
|
4335
|
+
const isMobile = (0, import_react33.useBreakpointValue)({ base: true, lg: false });
|
|
4179
4336
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4180
4337
|
Card,
|
|
4181
4338
|
{
|
|
4182
4339
|
activeIcon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon6, { size: 18 }),
|
|
4183
4340
|
title: config.label,
|
|
4184
4341
|
subtitle: config.description,
|
|
4185
|
-
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: [
|
|
4186
4343
|
requiredTag,
|
|
4187
4344
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StatusPill, { status })
|
|
4188
4345
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, {}),
|
|
4189
4346
|
children: [
|
|
4190
4347
|
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4191
|
-
|
|
4348
|
+
import_react33.Flex,
|
|
4192
4349
|
{
|
|
4193
4350
|
align: "center",
|
|
4194
4351
|
justifySelf: "flex-end",
|
|
@@ -4237,6 +4394,96 @@ function DocumentUploadCard({
|
|
|
4237
4394
|
);
|
|
4238
4395
|
}
|
|
4239
4396
|
|
|
4397
|
+
// src/services/OcrService.ts
|
|
4398
|
+
var ENDPOINTS3 = {
|
|
4399
|
+
scan: "/Ocr/Scan"
|
|
4400
|
+
};
|
|
4401
|
+
var isObject = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
4402
|
+
var readField = (source, keys) => {
|
|
4403
|
+
if (!source) return "";
|
|
4404
|
+
for (const key of keys) {
|
|
4405
|
+
const match = Object.keys(source).find(
|
|
4406
|
+
(k) => k.toLowerCase() === key.toLowerCase()
|
|
4407
|
+
);
|
|
4408
|
+
const value = match ? source[match] : void 0;
|
|
4409
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
4410
|
+
if (typeof value === "number") return String(value);
|
|
4411
|
+
}
|
|
4412
|
+
return "";
|
|
4413
|
+
};
|
|
4414
|
+
var pad = (value) => String(value).padStart(2, "0");
|
|
4415
|
+
var toIsoDate = (value) => {
|
|
4416
|
+
if (!value) return "";
|
|
4417
|
+
if (/^\d{4}-\d{2}-\d{2}/.test(value)) return value.slice(0, 10);
|
|
4418
|
+
const parts = value.split(/[/-]/).map((part) => part.trim());
|
|
4419
|
+
if (parts.length === 3 && parts.every(Boolean)) {
|
|
4420
|
+
const [first = "", second = "", third = ""] = parts;
|
|
4421
|
+
if (first.length === 4) return `${first}-${pad(second)}-${pad(third)}`;
|
|
4422
|
+
if (third.length === 4) return `${third}-${pad(first)}-${pad(second)}`;
|
|
4423
|
+
}
|
|
4424
|
+
const parsed = new Date(value);
|
|
4425
|
+
if (Number.isNaN(parsed.getTime())) return "";
|
|
4426
|
+
return `${parsed.getFullYear()}-${pad(parsed.getMonth() + 1)}-${pad(parsed.getDate())}`;
|
|
4427
|
+
};
|
|
4428
|
+
var toIdType = (value) => {
|
|
4429
|
+
const text = value.toLowerCase();
|
|
4430
|
+
if (!text) return "";
|
|
4431
|
+
if (text.includes("passport")) return "passport";
|
|
4432
|
+
if (text.includes("driver")) return "driver_license";
|
|
4433
|
+
if (text.includes("national") || text.includes("id")) return "national_id";
|
|
4434
|
+
return "";
|
|
4435
|
+
};
|
|
4436
|
+
var toOcrValue = (body) => {
|
|
4437
|
+
const root = isObject(body) ? body : void 0;
|
|
4438
|
+
const nested = root ? Object.entries(root).find(
|
|
4439
|
+
([key, value]) => key.toLowerCase() === "response" && isObject(value)
|
|
4440
|
+
)?.[1] : void 0;
|
|
4441
|
+
const source = isObject(nested) ? nested : root;
|
|
4442
|
+
return {
|
|
4443
|
+
firstName: readField(source, ["firstName"]),
|
|
4444
|
+
middleName: readField(source, ["middleName"]),
|
|
4445
|
+
lastName: readField(source, ["lastName"]),
|
|
4446
|
+
birthDate: toIsoDate(readField(source, ["birthDate", "dateOfBirth"])),
|
|
4447
|
+
idType: toIdType(readField(source, ["idType"])),
|
|
4448
|
+
idNumber: readField(source, ["idNumber", "idNo"]),
|
|
4449
|
+
addressLine: readField(source, ["addressLine", "address", "completeAddress"])
|
|
4450
|
+
};
|
|
4451
|
+
};
|
|
4452
|
+
var toFormData = (docType, source) => {
|
|
4453
|
+
const formData = new FormData();
|
|
4454
|
+
formData.append("DocType", docType);
|
|
4455
|
+
if (typeof source === "string") {
|
|
4456
|
+
formData.append("OCRType", "URL");
|
|
4457
|
+
formData.append("ImageUrl", source.trim());
|
|
4458
|
+
} else {
|
|
4459
|
+
formData.append("OCRType", "File");
|
|
4460
|
+
formData.append("File", source);
|
|
4461
|
+
}
|
|
4462
|
+
return formData;
|
|
4463
|
+
};
|
|
4464
|
+
var OcrService = {
|
|
4465
|
+
async scan(docType, source) {
|
|
4466
|
+
return api.post(ENDPOINTS3.scan, toFormData(docType, source), {
|
|
4467
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
4468
|
+
timeout: 9e4
|
|
4469
|
+
});
|
|
4470
|
+
},
|
|
4471
|
+
async scanId(source) {
|
|
4472
|
+
const body = await OcrService.scan("ID", source);
|
|
4473
|
+
const result = toOcrValue(body);
|
|
4474
|
+
if (!result.firstName && !result.lastName && !result.idNumber) {
|
|
4475
|
+
const description = isObject(body) ? readField(body, ["description", "message"]) : "";
|
|
4476
|
+
throw new APIError(
|
|
4477
|
+
description || "We couldn't read your ID. Please upload a clearer photo."
|
|
4478
|
+
);
|
|
4479
|
+
}
|
|
4480
|
+
return result;
|
|
4481
|
+
},
|
|
4482
|
+
async scanLpa(source) {
|
|
4483
|
+
return OcrService.scan("LPA", source);
|
|
4484
|
+
}
|
|
4485
|
+
};
|
|
4486
|
+
|
|
4240
4487
|
// src/GetStarted/GetStarted.tsx
|
|
4241
4488
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4242
4489
|
var defaultNotify = (type, message) => {
|
|
@@ -4266,16 +4513,16 @@ var SIGNATURE_CONFIG = {
|
|
|
4266
4513
|
icon: import_lu7.LuSignature
|
|
4267
4514
|
};
|
|
4268
4515
|
var GetStarted = ({
|
|
4269
|
-
scanId: scanIdFn,
|
|
4516
|
+
scanId: scanIdFn = OcrService.scanId,
|
|
4270
4517
|
onContinue,
|
|
4271
4518
|
notify = defaultNotify
|
|
4272
4519
|
}) => {
|
|
4273
|
-
const [uploadDialogOpen, setUploadDialogOpen] = (0,
|
|
4274
|
-
const [referralDialogOpen, setReferralDialogOpen] = (0,
|
|
4275
|
-
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");
|
|
4276
4523
|
const { scanId } = useOcr(scanIdFn);
|
|
4277
4524
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Container_default, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4278
|
-
|
|
4525
|
+
import_react34.Box,
|
|
4279
4526
|
{
|
|
4280
4527
|
p: { base: 0, md: 8 },
|
|
4281
4528
|
rounded: "lg",
|
|
@@ -4287,10 +4534,10 @@ var GetStarted = ({
|
|
|
4287
4534
|
alignItems: "center",
|
|
4288
4535
|
mx: "auto",
|
|
4289
4536
|
children: [
|
|
4290
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4291
|
-
/* @__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" }) }),
|
|
4292
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" }),
|
|
4293
|
-
/* @__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: [
|
|
4294
4541
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { fontWeight: "bold", children: "Required Information" }),
|
|
4295
4542
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "1. Full Name" }),
|
|
4296
4543
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "2. Nationality" }),
|
|
@@ -4304,16 +4551,16 @@ var GetStarted = ({
|
|
|
4304
4551
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.BaseText, { children: "2. Specimen Signature" })
|
|
4305
4552
|
] }) }) })
|
|
4306
4553
|
] }),
|
|
4307
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Box, { textAlign: "end", children: [
|
|
4308
4555
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4309
|
-
|
|
4556
|
+
import_react34.Dialog.Root,
|
|
4310
4557
|
{
|
|
4311
4558
|
size: { mdDown: "full", md: "md" },
|
|
4312
4559
|
open: uploadDialogOpen,
|
|
4313
4560
|
onOpenChange: (details) => setUploadDialogOpen(details.open),
|
|
4314
4561
|
children: [
|
|
4315
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4316
|
-
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4563
|
+
import_react34.Button,
|
|
4317
4564
|
{
|
|
4318
4565
|
w: { base: "sm", md: "2xl" },
|
|
4319
4566
|
mt: { base: 4, md: 8 },
|
|
@@ -4321,11 +4568,11 @@ var GetStarted = ({
|
|
|
4321
4568
|
children: "CONTINUE"
|
|
4322
4569
|
}
|
|
4323
4570
|
) }),
|
|
4324
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4325
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4326
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4327
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4328
|
-
/* @__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: [
|
|
4329
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." }),
|
|
4330
4577
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4331
4578
|
DocumentUploadCard,
|
|
@@ -4344,8 +4591,8 @@ var GetStarted = ({
|
|
|
4344
4591
|
}
|
|
4345
4592
|
)
|
|
4346
4593
|
] }) }),
|
|
4347
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4348
|
-
/* @__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, {}) }),
|
|
4349
4596
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4350
4597
|
import_st_peter_ui8.NextButton,
|
|
4351
4598
|
{
|
|
@@ -4364,30 +4611,30 @@ var GetStarted = ({
|
|
|
4364
4611
|
}
|
|
4365
4612
|
)
|
|
4366
4613
|
] }),
|
|
4367
|
-
/* @__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" }) })
|
|
4368
4615
|
] }) })
|
|
4369
4616
|
] })
|
|
4370
4617
|
]
|
|
4371
4618
|
}
|
|
4372
4619
|
),
|
|
4373
4620
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4374
|
-
|
|
4621
|
+
import_react34.Dialog.Root,
|
|
4375
4622
|
{
|
|
4376
4623
|
placement: "center",
|
|
4377
4624
|
open: referralDialogOpen,
|
|
4378
4625
|
onOpenChange: (details) => setReferralDialogOpen(details.open),
|
|
4379
4626
|
size: { mdDown: "full", md: "md" },
|
|
4380
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4381
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4382
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4383
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4384
|
-
/* @__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: [
|
|
4385
4632
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_st_peter_ui8.Body, { children: "Do you have an referral agent? (optional)" }),
|
|
4386
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4633
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react34.Input, { placeholder: "Enter agent name" })
|
|
4387
4634
|
] }) }),
|
|
4388
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4635
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react34.Dialog.Footer, { display: "flex", justifyContent: "space-between", children: [
|
|
4389
4636
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4390
|
-
|
|
4637
|
+
import_react34.Button,
|
|
4391
4638
|
{
|
|
4392
4639
|
variant: "outline",
|
|
4393
4640
|
onClick: () => {
|
|
@@ -4408,7 +4655,7 @@ var GetStarted = ({
|
|
|
4408
4655
|
}
|
|
4409
4656
|
)
|
|
4410
4657
|
] }),
|
|
4411
|
-
/* @__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" }) })
|
|
4412
4659
|
] }) })
|
|
4413
4660
|
] })
|
|
4414
4661
|
}
|
|
@@ -4421,8 +4668,8 @@ var GetStarted = ({
|
|
|
4421
4668
|
var GetStarted_default = GetStarted;
|
|
4422
4669
|
|
|
4423
4670
|
// src/Generic/BottomQuickActions.tsx
|
|
4424
|
-
var
|
|
4425
|
-
var
|
|
4671
|
+
var import_react36 = __toESM(require("react"));
|
|
4672
|
+
var import_react37 = require("@chakra-ui/react");
|
|
4426
4673
|
var import_lu8 = require("react-icons/lu");
|
|
4427
4674
|
var import_link = __toESM(require("next/link"));
|
|
4428
4675
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
@@ -4442,7 +4689,7 @@ var SUBTITLE_COLOR = BRAND_COLORS.grey;
|
|
|
4442
4689
|
var LABEL_COLOR = BRAND_COLORS.neutralText;
|
|
4443
4690
|
var DESC_COLOR = BRAND_COLORS.grey;
|
|
4444
4691
|
var CHEVRON_COLOR = BRAND_COLORS.ashWhite;
|
|
4445
|
-
var QuickActionsHeaderCard =
|
|
4692
|
+
var QuickActionsHeaderCard = import_react36.default.memo(
|
|
4446
4693
|
({
|
|
4447
4694
|
initials,
|
|
4448
4695
|
avatarBg = AVATAR_DEFAULT_BG,
|
|
@@ -4450,7 +4697,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4450
4697
|
meta,
|
|
4451
4698
|
trailing
|
|
4452
4699
|
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4453
|
-
|
|
4700
|
+
import_react37.HStack,
|
|
4454
4701
|
{
|
|
4455
4702
|
gap: STANDARD_SPACING.sm,
|
|
4456
4703
|
px: STANDARD_SPACING.sm,
|
|
@@ -4461,7 +4708,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4461
4708
|
borderColor: HEADER_CARD_BORDER,
|
|
4462
4709
|
children: [
|
|
4463
4710
|
initials && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4464
|
-
|
|
4711
|
+
import_react37.Flex,
|
|
4465
4712
|
{
|
|
4466
4713
|
w: "40px",
|
|
4467
4714
|
h: "40px",
|
|
@@ -4471,7 +4718,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4471
4718
|
justify: "center",
|
|
4472
4719
|
flexShrink: 0,
|
|
4473
4720
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4474
|
-
|
|
4721
|
+
import_react37.Text,
|
|
4475
4722
|
{
|
|
4476
4723
|
fontSize: "14px",
|
|
4477
4724
|
fontWeight: "700",
|
|
@@ -4482,9 +4729,9 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4482
4729
|
)
|
|
4483
4730
|
}
|
|
4484
4731
|
),
|
|
4485
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4732
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Box, { flex: "1", minW: 0, children: [
|
|
4486
4733
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4487
|
-
|
|
4734
|
+
import_react37.Text,
|
|
4488
4735
|
{
|
|
4489
4736
|
fontSize: "15px",
|
|
4490
4737
|
fontWeight: "700",
|
|
@@ -4497,7 +4744,7 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4497
4744
|
}
|
|
4498
4745
|
),
|
|
4499
4746
|
meta && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4500
|
-
|
|
4747
|
+
import_react37.Text,
|
|
4501
4748
|
{
|
|
4502
4749
|
fontSize: "12px",
|
|
4503
4750
|
color: SUBTITLE_COLOR,
|
|
@@ -4518,11 +4765,11 @@ var QuickActionsHeaderCard = import_react35.default.memo(
|
|
|
4518
4765
|
var ITEM_TRANSITION = {
|
|
4519
4766
|
transition: "background 0.15s ease, transform 0.1s ease"
|
|
4520
4767
|
};
|
|
4521
|
-
var ActionItem =
|
|
4768
|
+
var ActionItem = import_react36.default.memo(({ action }) => {
|
|
4522
4769
|
const iconBg = action.iconBg ?? DEFAULT_ICON_BG;
|
|
4523
4770
|
const iconColor = action.iconColor ?? DEFAULT_ICON_COLOR;
|
|
4524
4771
|
const inner = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4525
|
-
|
|
4772
|
+
import_react37.HStack,
|
|
4526
4773
|
{
|
|
4527
4774
|
gap: STANDARD_SPACING.sm,
|
|
4528
4775
|
px: STANDARD_SPACING.sm,
|
|
@@ -4545,7 +4792,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4545
4792
|
style: ITEM_TRANSITION,
|
|
4546
4793
|
children: [
|
|
4547
4794
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4548
|
-
|
|
4795
|
+
import_react37.Flex,
|
|
4549
4796
|
{
|
|
4550
4797
|
w: "40px",
|
|
4551
4798
|
h: "40px",
|
|
@@ -4554,12 +4801,12 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4554
4801
|
align: "center",
|
|
4555
4802
|
justify: "center",
|
|
4556
4803
|
flexShrink: 0,
|
|
4557
|
-
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 })
|
|
4558
4805
|
}
|
|
4559
4806
|
),
|
|
4560
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react37.Box, { flex: "1", minW: 0, children: [
|
|
4561
4808
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4562
|
-
|
|
4809
|
+
import_react37.Text,
|
|
4563
4810
|
{
|
|
4564
4811
|
fontSize: "15px",
|
|
4565
4812
|
fontWeight: "600",
|
|
@@ -4569,7 +4816,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4569
4816
|
}
|
|
4570
4817
|
),
|
|
4571
4818
|
action.description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4572
|
-
|
|
4819
|
+
import_react37.Text,
|
|
4573
4820
|
{
|
|
4574
4821
|
fontSize: "12px",
|
|
4575
4822
|
color: DESC_COLOR,
|
|
@@ -4583,7 +4830,7 @@ var ActionItem = import_react35.default.memo(({ action }) => {
|
|
|
4583
4830
|
)
|
|
4584
4831
|
] }),
|
|
4585
4832
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4586
|
-
|
|
4833
|
+
import_react37.Icon,
|
|
4587
4834
|
{
|
|
4588
4835
|
as: import_lu8.LuChevronRight,
|
|
4589
4836
|
boxSize: "18px",
|
|
@@ -4615,15 +4862,15 @@ var BottomQuickActions = ({
|
|
|
4615
4862
|
actions
|
|
4616
4863
|
}) => {
|
|
4617
4864
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4618
|
-
|
|
4865
|
+
import_react37.Drawer.Root,
|
|
4619
4866
|
{
|
|
4620
4867
|
open,
|
|
4621
4868
|
onOpenChange: (e) => onOpenChange(e.open),
|
|
4622
4869
|
placement: "bottom",
|
|
4623
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4624
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4625
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4626
|
-
|
|
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,
|
|
4627
4874
|
{
|
|
4628
4875
|
borderTopRadius: "l3",
|
|
4629
4876
|
borderBottomRadius: "0",
|
|
@@ -4633,8 +4880,8 @@ var BottomQuickActions = ({
|
|
|
4633
4880
|
pb: `calc(${STANDARD_SPACING.sm} + env(safe-area-inset-bottom))`,
|
|
4634
4881
|
boxShadow: STANDARD_SHADOWS.level4,
|
|
4635
4882
|
children: [
|
|
4636
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4637
|
-
|
|
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,
|
|
4638
4885
|
{
|
|
4639
4886
|
w: "36px",
|
|
4640
4887
|
h: "4px",
|
|
@@ -4643,16 +4890,16 @@ var BottomQuickActions = ({
|
|
|
4643
4890
|
}
|
|
4644
4891
|
) }),
|
|
4645
4892
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4646
|
-
|
|
4893
|
+
import_react37.Drawer.Header,
|
|
4647
4894
|
{
|
|
4648
4895
|
px: STANDARD_SPACING.sm,
|
|
4649
4896
|
pt: "12px",
|
|
4650
4897
|
pb: "0",
|
|
4651
4898
|
borderBottomWidth: "0",
|
|
4652
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4653
|
-
/* @__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: [
|
|
4654
4901
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4655
|
-
|
|
4902
|
+
import_react37.Drawer.Title,
|
|
4656
4903
|
{
|
|
4657
4904
|
fontSize: "18px",
|
|
4658
4905
|
fontWeight: "700",
|
|
@@ -4663,7 +4910,7 @@ var BottomQuickActions = ({
|
|
|
4663
4910
|
}
|
|
4664
4911
|
),
|
|
4665
4912
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4666
|
-
|
|
4913
|
+
import_react37.Text,
|
|
4667
4914
|
{
|
|
4668
4915
|
fontSize: "13px",
|
|
4669
4916
|
color: SUBTITLE_COLOR,
|
|
@@ -4674,8 +4921,8 @@ var BottomQuickActions = ({
|
|
|
4674
4921
|
}
|
|
4675
4922
|
)
|
|
4676
4923
|
] }),
|
|
4677
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4678
|
-
|
|
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,
|
|
4679
4926
|
{
|
|
4680
4927
|
size: "sm",
|
|
4681
4928
|
color: BRAND_COLORS.neutralText,
|
|
@@ -4687,14 +4934,14 @@ var BottomQuickActions = ({
|
|
|
4687
4934
|
}
|
|
4688
4935
|
),
|
|
4689
4936
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4690
|
-
|
|
4937
|
+
import_react37.Drawer.Body,
|
|
4691
4938
|
{
|
|
4692
4939
|
px: STANDARD_SPACING.sm,
|
|
4693
4940
|
pt: STANDARD_SPACING.sm,
|
|
4694
4941
|
pb: "4px",
|
|
4695
4942
|
children: [
|
|
4696
|
-
headerSlot && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4697
|
-
/* @__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)) })
|
|
4698
4945
|
]
|
|
4699
4946
|
}
|
|
4700
4947
|
)
|
|
@@ -4708,18 +4955,18 @@ var BottomQuickActions = ({
|
|
|
4708
4955
|
var BottomQuickActions_default = BottomQuickActions;
|
|
4709
4956
|
|
|
4710
4957
|
// src/Generic/NotifyInstall.tsx
|
|
4711
|
-
var
|
|
4712
|
-
var
|
|
4713
|
-
var
|
|
4958
|
+
var import_react39 = require("react");
|
|
4959
|
+
var import_react40 = require("@chakra-ui/react");
|
|
4960
|
+
var import_react41 = require("motion/react");
|
|
4714
4961
|
var import_fi2 = require("react-icons/fi");
|
|
4715
4962
|
|
|
4716
4963
|
// src/hooks/useNotifyInstall.ts
|
|
4717
|
-
var
|
|
4964
|
+
var import_react38 = require("react");
|
|
4718
4965
|
function useNotifyInstall() {
|
|
4719
|
-
const [isInstalled, setIsInstalled] = (0,
|
|
4720
|
-
const [isMobile, setIsMobile] = (0,
|
|
4721
|
-
const [installPrompt, setInstallPrompt] = (0,
|
|
4722
|
-
(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)(() => {
|
|
4723
4970
|
const mobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
4724
4971
|
setIsMobile(mobile);
|
|
4725
4972
|
const installed = window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
@@ -4762,8 +5009,8 @@ function NotifyInstall({
|
|
|
4762
5009
|
appName
|
|
4763
5010
|
}) {
|
|
4764
5011
|
const { isInstalled, isMobile, canInstall, install } = useNotifyInstall();
|
|
4765
|
-
const [isDismissed, setIsDismissed] = (0,
|
|
4766
|
-
(0,
|
|
5012
|
+
const [isDismissed, setIsDismissed] = (0, import_react39.useState)(true);
|
|
5013
|
+
(0, import_react39.useEffect)(() => {
|
|
4767
5014
|
if (localStorage.getItem(DISMISSED_KEY) !== "true") {
|
|
4768
5015
|
setIsDismissed(false);
|
|
4769
5016
|
}
|
|
@@ -4775,9 +5022,9 @@ function NotifyInstall({
|
|
|
4775
5022
|
const showPrompt = isMobile && !isInstalled && !isDismissed;
|
|
4776
5023
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
4777
5024
|
children,
|
|
4778
|
-
/* @__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: [
|
|
4779
5026
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4780
|
-
|
|
5027
|
+
import_react41.motion.div,
|
|
4781
5028
|
{
|
|
4782
5029
|
initial: { opacity: 0 },
|
|
4783
5030
|
animate: { opacity: 1 },
|
|
@@ -4796,7 +5043,7 @@ function NotifyInstall({
|
|
|
4796
5043
|
"install-backdrop"
|
|
4797
5044
|
),
|
|
4798
5045
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4799
|
-
|
|
5046
|
+
import_react41.motion.div,
|
|
4800
5047
|
{
|
|
4801
5048
|
initial: { y: "100%" },
|
|
4802
5049
|
animate: { y: 0 },
|
|
@@ -4836,9 +5083,9 @@ function NotifyInstall({
|
|
|
4836
5083
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_fi2.FiX, { size: 18 })
|
|
4837
5084
|
}
|
|
4838
5085
|
),
|
|
4839
|
-
/* @__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: [
|
|
4840
5087
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4841
|
-
|
|
5088
|
+
import_react40.Flex,
|
|
4842
5089
|
{
|
|
4843
5090
|
boxSize: 16,
|
|
4844
5091
|
align: "center",
|
|
@@ -4847,12 +5094,12 @@ function NotifyInstall({
|
|
|
4847
5094
|
bg: "green.50",
|
|
4848
5095
|
color: "green.600",
|
|
4849
5096
|
shadow: "sm",
|
|
4850
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: import_fi2.FiDownload, boxSize: 8 })
|
|
4851
5098
|
}
|
|
4852
5099
|
),
|
|
4853
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react40.VStack, { gap: 2, children: [
|
|
4854
5101
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4855
|
-
|
|
5102
|
+
import_react40.Text,
|
|
4856
5103
|
{
|
|
4857
5104
|
fontSize: "lg",
|
|
4858
5105
|
fontWeight: "bold",
|
|
@@ -4864,10 +5111,10 @@ function NotifyInstall({
|
|
|
4864
5111
|
]
|
|
4865
5112
|
}
|
|
4866
5113
|
),
|
|
4867
|
-
/* @__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." })
|
|
4868
5115
|
] }),
|
|
4869
5116
|
canInstall ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4870
|
-
|
|
5117
|
+
import_react40.Button,
|
|
4871
5118
|
{
|
|
4872
5119
|
onClick: install,
|
|
4873
5120
|
colorPalette: "green",
|
|
@@ -4875,12 +5122,12 @@ function NotifyInstall({
|
|
|
4875
5122
|
w: "full",
|
|
4876
5123
|
rounded: "xl",
|
|
4877
5124
|
children: [
|
|
4878
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5125
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: import_fi2.FiDownload }),
|
|
4879
5126
|
"Add to Home Screen"
|
|
4880
5127
|
]
|
|
4881
5128
|
}
|
|
4882
5129
|
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4883
|
-
|
|
5130
|
+
import_react40.VStack,
|
|
4884
5131
|
{
|
|
4885
5132
|
w: "full",
|
|
4886
5133
|
bg: "gray.50",
|
|
@@ -4890,9 +5137,9 @@ function NotifyInstall({
|
|
|
4890
5137
|
p: 4,
|
|
4891
5138
|
gap: 4,
|
|
4892
5139
|
align: "stretch",
|
|
4893
|
-
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: [
|
|
4894
5141
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4895
|
-
|
|
5142
|
+
import_react40.Flex,
|
|
4896
5143
|
{
|
|
4897
5144
|
boxSize: 9,
|
|
4898
5145
|
flexShrink: 0,
|
|
@@ -4903,10 +5150,10 @@ function NotifyInstall({
|
|
|
4903
5150
|
borderWidth: "1px",
|
|
4904
5151
|
borderColor: "gray.200",
|
|
4905
5152
|
color: "green.600",
|
|
4906
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react40.Icon, { as: step.icon, boxSize: 4 })
|
|
4907
5154
|
}
|
|
4908
5155
|
),
|
|
4909
|
-
/* @__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 })
|
|
4910
5157
|
] }, i))
|
|
4911
5158
|
}
|
|
4912
5159
|
)
|
|
@@ -4920,8 +5167,8 @@ function NotifyInstall({
|
|
|
4920
5167
|
}
|
|
4921
5168
|
|
|
4922
5169
|
// src/UserProfile/UserProfile.tsx
|
|
4923
|
-
var
|
|
4924
|
-
var
|
|
5170
|
+
var import_react42 = require("react");
|
|
5171
|
+
var import_react43 = require("@chakra-ui/react");
|
|
4925
5172
|
var import_ri = require("react-icons/ri");
|
|
4926
5173
|
var import_lu9 = require("react-icons/lu");
|
|
4927
5174
|
var import_hi2 = require("react-icons/hi2");
|
|
@@ -5228,28 +5475,28 @@ function ReusableProfile({
|
|
|
5228
5475
|
onTwoFactorChange,
|
|
5229
5476
|
onToast = noopToast
|
|
5230
5477
|
}) {
|
|
5231
|
-
const [profileView, setProfileView] = (0,
|
|
5232
|
-
const [fallbackColorMode, setFallbackColorMode] = (0,
|
|
5478
|
+
const [profileView, setProfileView] = (0, import_react42.useState)("main");
|
|
5479
|
+
const [fallbackColorMode, setFallbackColorMode] = (0, import_react42.useState)("light");
|
|
5233
5480
|
const colorMode = controlledColorMode ?? fallbackColorMode;
|
|
5234
|
-
const [fontSize, setFontSizeLocal] = (0,
|
|
5235
|
-
const [quickNavHrefs, setQuickNavHrefs] = (0,
|
|
5236
|
-
const [replacingIdx, setReplacingIdx] = (0,
|
|
5237
|
-
const [editName, setEditName] = (0,
|
|
5238
|
-
const [editLoading, setEditLoading] = (0,
|
|
5239
|
-
const [currentPw, setCurrentPw] = (0,
|
|
5240
|
-
const [newPw, setNewPw] = (0,
|
|
5241
|
-
const [confirmPw, setConfirmPw] = (0,
|
|
5242
|
-
const [showCurrentPw, setShowCurrentPw] = (0,
|
|
5243
|
-
const [showNewPw, setShowNewPw] = (0,
|
|
5244
|
-
const [showConfirmPw, setShowConfirmPw] = (0,
|
|
5245
|
-
const [pwLoading, setPwLoading] = (0,
|
|
5246
|
-
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)(
|
|
5247
5494
|
initialTwoFactorEnabled
|
|
5248
5495
|
);
|
|
5249
|
-
const [isMounted, setIsMounted] = (0,
|
|
5250
|
-
const isDesktopRaw = (0,
|
|
5496
|
+
const [isMounted, setIsMounted] = (0, import_react42.useState)(false);
|
|
5497
|
+
const isDesktopRaw = (0, import_react43.useBreakpointValue)({ base: false, md: true });
|
|
5251
5498
|
const isDesktop = isMounted ? isDesktopRaw ?? false : false;
|
|
5252
|
-
(0,
|
|
5499
|
+
(0, import_react42.useEffect)(() => {
|
|
5253
5500
|
setIsMounted(true);
|
|
5254
5501
|
if (!enableLocalStorage || typeof window === "undefined") return;
|
|
5255
5502
|
setFontSizeLocal(localStorage.getItem(FONT_SIZE_STORAGE_KEY) ?? "md");
|
|
@@ -5260,10 +5507,10 @@ function ReusableProfile({
|
|
|
5260
5507
|
setQuickNavHrefs(initialQuickNavHrefs);
|
|
5261
5508
|
}
|
|
5262
5509
|
}, [enableLocalStorage, initialQuickNavHrefs, storageKey]);
|
|
5263
|
-
(0,
|
|
5510
|
+
(0, import_react42.useEffect)(() => {
|
|
5264
5511
|
setEditName(user.displayName);
|
|
5265
5512
|
}, [user.displayName]);
|
|
5266
|
-
const availableOptions = (0,
|
|
5513
|
+
const availableOptions = (0, import_react42.useMemo)(
|
|
5267
5514
|
() => availableNavOptions.filter(
|
|
5268
5515
|
(option) => !user.role || option.roles.includes(user.role)
|
|
5269
5516
|
),
|
|
@@ -5393,7 +5640,7 @@ function ReusableProfile({
|
|
|
5393
5640
|
const roleLabel = user.role ? ROLE_LABELS[user.role] ?? user.role : "";
|
|
5394
5641
|
const mainContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
5395
5642
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5396
|
-
|
|
5643
|
+
import_react43.Box,
|
|
5397
5644
|
{
|
|
5398
5645
|
bg: "var(--chakra-colors-primary)",
|
|
5399
5646
|
pt: 12,
|
|
@@ -5402,20 +5649,20 @@ function ReusableProfile({
|
|
|
5402
5649
|
textAlign: "center",
|
|
5403
5650
|
children: [
|
|
5404
5651
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5405
|
-
|
|
5652
|
+
import_react43.Avatar.Root,
|
|
5406
5653
|
{
|
|
5407
5654
|
size: "2xl",
|
|
5408
5655
|
mx: "auto",
|
|
5409
5656
|
mb: 4,
|
|
5410
5657
|
colorPalette: pickPalette(user.displayName || "U"),
|
|
5411
5658
|
children: [
|
|
5412
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5413
|
-
/* @__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 })
|
|
5414
5661
|
]
|
|
5415
5662
|
}
|
|
5416
5663
|
),
|
|
5417
5664
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5418
|
-
|
|
5665
|
+
import_react43.Text,
|
|
5419
5666
|
{
|
|
5420
5667
|
color: "white",
|
|
5421
5668
|
fontWeight: "bold",
|
|
@@ -5425,9 +5672,9 @@ function ReusableProfile({
|
|
|
5425
5672
|
children: user.displayName
|
|
5426
5673
|
}
|
|
5427
5674
|
),
|
|
5428
|
-
user.email && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5429
|
-
roleLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5430
|
-
|
|
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,
|
|
5431
5678
|
{
|
|
5432
5679
|
bg: "rgba(255,255,255,0.15)",
|
|
5433
5680
|
color: "white",
|
|
@@ -5443,9 +5690,9 @@ function ReusableProfile({
|
|
|
5443
5690
|
]
|
|
5444
5691
|
}
|
|
5445
5692
|
),
|
|
5446
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5693
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 5, pb: 1, children: [
|
|
5447
5694
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5448
|
-
|
|
5695
|
+
import_react43.Text,
|
|
5449
5696
|
{
|
|
5450
5697
|
fontSize: "xs",
|
|
5451
5698
|
fontWeight: "bold",
|
|
@@ -5457,7 +5704,7 @@ function ReusableProfile({
|
|
|
5457
5704
|
}
|
|
5458
5705
|
),
|
|
5459
5706
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5460
|
-
|
|
5707
|
+
import_react43.Box,
|
|
5461
5708
|
{
|
|
5462
5709
|
as: "button",
|
|
5463
5710
|
w: "full",
|
|
@@ -5466,7 +5713,7 @@ function ReusableProfile({
|
|
|
5466
5713
|
transition: "opacity 0.15s",
|
|
5467
5714
|
onClick: () => setProfileView("edit-account"),
|
|
5468
5715
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5469
|
-
|
|
5716
|
+
import_react43.Flex,
|
|
5470
5717
|
{
|
|
5471
5718
|
justify: "space-between",
|
|
5472
5719
|
align: "center",
|
|
@@ -5475,9 +5722,9 @@ function ReusableProfile({
|
|
|
5475
5722
|
borderRadius: "lg",
|
|
5476
5723
|
bg: isDesktop && profileView === "edit-account" ? "gray.100" : void 0,
|
|
5477
5724
|
children: [
|
|
5478
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5725
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5479
5726
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5480
|
-
|
|
5727
|
+
import_react43.Box,
|
|
5481
5728
|
{
|
|
5482
5729
|
w: "38px",
|
|
5483
5730
|
h: "38px",
|
|
@@ -5491,9 +5738,9 @@ function ReusableProfile({
|
|
|
5491
5738
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuUser, { size: 16 })
|
|
5492
5739
|
}
|
|
5493
5740
|
),
|
|
5494
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5495
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5496
|
-
/* @__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" })
|
|
5497
5744
|
] })
|
|
5498
5745
|
] }),
|
|
5499
5746
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -5502,9 +5749,9 @@ function ReusableProfile({
|
|
|
5502
5749
|
)
|
|
5503
5750
|
}
|
|
5504
5751
|
),
|
|
5505
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5752
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5506
5753
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5507
|
-
|
|
5754
|
+
import_react43.Box,
|
|
5508
5755
|
{
|
|
5509
5756
|
as: "button",
|
|
5510
5757
|
w: "full",
|
|
@@ -5516,7 +5763,7 @@ function ReusableProfile({
|
|
|
5516
5763
|
setProfileView("change-password");
|
|
5517
5764
|
},
|
|
5518
5765
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5519
|
-
|
|
5766
|
+
import_react43.Flex,
|
|
5520
5767
|
{
|
|
5521
5768
|
justify: "space-between",
|
|
5522
5769
|
align: "center",
|
|
@@ -5525,9 +5772,9 @@ function ReusableProfile({
|
|
|
5525
5772
|
borderRadius: "lg",
|
|
5526
5773
|
bg: isDesktop && profileView === "change-password" ? "gray.100" : void 0,
|
|
5527
5774
|
children: [
|
|
5528
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
5529
5776
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5530
|
-
|
|
5777
|
+
import_react43.Box,
|
|
5531
5778
|
{
|
|
5532
5779
|
w: "38px",
|
|
5533
5780
|
h: "38px",
|
|
@@ -5541,9 +5788,9 @@ function ReusableProfile({
|
|
|
5541
5788
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuLock, { size: 16 })
|
|
5542
5789
|
}
|
|
5543
5790
|
),
|
|
5544
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5545
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5546
|
-
/* @__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" })
|
|
5547
5794
|
] })
|
|
5548
5795
|
] }),
|
|
5549
5796
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronRight, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
@@ -5552,11 +5799,11 @@ function ReusableProfile({
|
|
|
5552
5799
|
)
|
|
5553
5800
|
}
|
|
5554
5801
|
),
|
|
5555
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5556
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5557
|
-
/* @__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: [
|
|
5558
5805
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5559
|
-
|
|
5806
|
+
import_react43.Box,
|
|
5560
5807
|
{
|
|
5561
5808
|
w: "38px",
|
|
5562
5809
|
h: "38px",
|
|
@@ -5570,13 +5817,13 @@ function ReusableProfile({
|
|
|
5570
5817
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuShield, { size: 16 })
|
|
5571
5818
|
}
|
|
5572
5819
|
),
|
|
5573
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5574
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5575
|
-
/* @__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" })
|
|
5576
5823
|
] })
|
|
5577
5824
|
] }),
|
|
5578
5825
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5579
|
-
|
|
5826
|
+
import_react43.Box,
|
|
5580
5827
|
{
|
|
5581
5828
|
role: "switch",
|
|
5582
5829
|
"aria-checked": twoFactorEnabled,
|
|
@@ -5599,7 +5846,7 @@ function ReusableProfile({
|
|
|
5599
5846
|
flexShrink: 0,
|
|
5600
5847
|
outline: "none",
|
|
5601
5848
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5602
|
-
|
|
5849
|
+
import_react43.Box,
|
|
5603
5850
|
{
|
|
5604
5851
|
position: "absolute",
|
|
5605
5852
|
top: "3px",
|
|
@@ -5616,9 +5863,9 @@ function ReusableProfile({
|
|
|
5616
5863
|
)
|
|
5617
5864
|
] })
|
|
5618
5865
|
] }),
|
|
5619
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { px: 4, pt: 4, pb: 2, children: [
|
|
5620
5867
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5621
|
-
|
|
5868
|
+
import_react43.Text,
|
|
5622
5869
|
{
|
|
5623
5870
|
fontSize: "xs",
|
|
5624
5871
|
fontWeight: "bold",
|
|
@@ -5629,10 +5876,10 @@ function ReusableProfile({
|
|
|
5629
5876
|
children: "Preferences"
|
|
5630
5877
|
}
|
|
5631
5878
|
),
|
|
5632
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5633
|
-
/* @__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: [
|
|
5634
5881
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5635
|
-
|
|
5882
|
+
import_react43.Box,
|
|
5636
5883
|
{
|
|
5637
5884
|
w: "38px",
|
|
5638
5885
|
h: "38px",
|
|
@@ -5646,15 +5893,15 @@ function ReusableProfile({
|
|
|
5646
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 })
|
|
5647
5894
|
}
|
|
5648
5895
|
),
|
|
5649
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5650
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5651
|
-
/* @__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" })
|
|
5652
5899
|
] })
|
|
5653
5900
|
] }),
|
|
5654
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5901
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.HStack, { gap: 1.5, children: ["light", "dark"].map((mode) => {
|
|
5655
5902
|
const isActive = colorMode === mode;
|
|
5656
5903
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5657
|
-
|
|
5904
|
+
import_react43.Button,
|
|
5658
5905
|
{
|
|
5659
5906
|
size: "sm",
|
|
5660
5907
|
variant: "outline",
|
|
@@ -5671,7 +5918,7 @@ function ReusableProfile({
|
|
|
5671
5918
|
children: [
|
|
5672
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 }),
|
|
5673
5920
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5674
|
-
|
|
5921
|
+
import_react43.Text,
|
|
5675
5922
|
{
|
|
5676
5923
|
fontSize: "xs",
|
|
5677
5924
|
textTransform: "capitalize",
|
|
@@ -5685,11 +5932,11 @@ function ReusableProfile({
|
|
|
5685
5932
|
);
|
|
5686
5933
|
}) })
|
|
5687
5934
|
] }),
|
|
5688
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5689
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5690
|
-
/* @__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: [
|
|
5691
5938
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5692
|
-
|
|
5939
|
+
import_react43.Box,
|
|
5693
5940
|
{
|
|
5694
5941
|
w: "38px",
|
|
5695
5942
|
h: "38px",
|
|
@@ -5705,15 +5952,15 @@ function ReusableProfile({
|
|
|
5705
5952
|
children: "A"
|
|
5706
5953
|
}
|
|
5707
5954
|
),
|
|
5708
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5709
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5710
|
-
/* @__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 })
|
|
5711
5958
|
] })
|
|
5712
5959
|
] }),
|
|
5713
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.HStack, { gap: 1, children: FONT_SIZES.map((option) => {
|
|
5714
5961
|
const isActive = fontSize === option.value;
|
|
5715
5962
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5716
|
-
|
|
5963
|
+
import_react43.Button,
|
|
5717
5964
|
{
|
|
5718
5965
|
size: "sm",
|
|
5719
5966
|
variant: "outline",
|
|
@@ -5729,7 +5976,7 @@ function ReusableProfile({
|
|
|
5729
5976
|
onClick: () => handleFontSize(option.value),
|
|
5730
5977
|
title: option.title,
|
|
5731
5978
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5732
|
-
|
|
5979
|
+
import_react43.Text,
|
|
5733
5980
|
{
|
|
5734
5981
|
fontWeight: isActive ? "bold" : "normal",
|
|
5735
5982
|
style: { fontSize: `${option.scale * 13}px` },
|
|
@@ -5741,9 +5988,9 @@ function ReusableProfile({
|
|
|
5741
5988
|
);
|
|
5742
5989
|
}) })
|
|
5743
5990
|
] }),
|
|
5744
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5991
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {}),
|
|
5745
5992
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5746
|
-
|
|
5993
|
+
import_react43.Box,
|
|
5747
5994
|
{
|
|
5748
5995
|
as: "button",
|
|
5749
5996
|
w: "full",
|
|
@@ -5751,10 +5998,10 @@ function ReusableProfile({
|
|
|
5751
5998
|
_hover: { opacity: 0.7 },
|
|
5752
5999
|
transition: "opacity 0.15s",
|
|
5753
6000
|
onClick: () => setProfileView("navbar-customize"),
|
|
5754
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5755
|
-
/* @__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: [
|
|
5756
6003
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5757
|
-
|
|
6004
|
+
import_react43.Box,
|
|
5758
6005
|
{
|
|
5759
6006
|
w: "38px",
|
|
5760
6007
|
h: "38px",
|
|
@@ -5768,9 +6015,9 @@ function ReusableProfile({
|
|
|
5768
6015
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuArrowLeftRight, { size: 16 })
|
|
5769
6016
|
}
|
|
5770
6017
|
),
|
|
5771
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5772
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5773
|
-
/* @__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: [
|
|
5774
6021
|
quickNavHrefs.length,
|
|
5775
6022
|
" of ",
|
|
5776
6023
|
maxQuickNavItems,
|
|
@@ -5783,8 +6030,8 @@ function ReusableProfile({
|
|
|
5783
6030
|
}
|
|
5784
6031
|
)
|
|
5785
6032
|
] }),
|
|
5786
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5787
|
-
|
|
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,
|
|
5788
6035
|
{
|
|
5789
6036
|
w: "full",
|
|
5790
6037
|
variant: "outline",
|
|
@@ -5797,9 +6044,9 @@ function ReusableProfile({
|
|
|
5797
6044
|
) }) })
|
|
5798
6045
|
] });
|
|
5799
6046
|
const editAccountContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
5800
|
-
/* @__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: [
|
|
5801
6048
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5802
|
-
|
|
6049
|
+
import_react43.IconButton,
|
|
5803
6050
|
{
|
|
5804
6051
|
size: "sm",
|
|
5805
6052
|
variant: "ghost",
|
|
@@ -5809,17 +6056,17 @@ function ReusableProfile({
|
|
|
5809
6056
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
5810
6057
|
}
|
|
5811
6058
|
),
|
|
5812
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontWeight: "bold", fontSize: "md", children: "Edit Account" })
|
|
5813
6060
|
] }) }),
|
|
5814
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5815
|
-
user.avatarSrc && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5816
|
-
/* @__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 })
|
|
5817
6064
|
] }) }),
|
|
5818
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5819
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5820
|
-
/* @__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" }),
|
|
5821
6068
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5822
|
-
|
|
6069
|
+
import_react43.Input,
|
|
5823
6070
|
{
|
|
5824
6071
|
value: editName,
|
|
5825
6072
|
onChange: (event) => setEditName(event.target.value),
|
|
@@ -5828,10 +6075,10 @@ function ReusableProfile({
|
|
|
5828
6075
|
}
|
|
5829
6076
|
)
|
|
5830
6077
|
] }),
|
|
5831
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5832
|
-
/* @__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" }),
|
|
5833
6080
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5834
|
-
|
|
6081
|
+
import_react43.Input,
|
|
5835
6082
|
{
|
|
5836
6083
|
value: user.email ?? "",
|
|
5837
6084
|
readOnly: true,
|
|
@@ -5841,10 +6088,10 @@ function ReusableProfile({
|
|
|
5841
6088
|
}
|
|
5842
6089
|
)
|
|
5843
6090
|
] }),
|
|
5844
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5845
|
-
/* @__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" }),
|
|
5846
6093
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5847
|
-
|
|
6094
|
+
import_react43.Input,
|
|
5848
6095
|
{
|
|
5849
6096
|
value: user.mobileNumber ?? "",
|
|
5850
6097
|
readOnly: true,
|
|
@@ -5855,7 +6102,7 @@ function ReusableProfile({
|
|
|
5855
6102
|
)
|
|
5856
6103
|
] }),
|
|
5857
6104
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5858
|
-
|
|
6105
|
+
import_react43.Button,
|
|
5859
6106
|
{
|
|
5860
6107
|
w: "full",
|
|
5861
6108
|
mt: 2,
|
|
@@ -5870,9 +6117,9 @@ function ReusableProfile({
|
|
|
5870
6117
|
] })
|
|
5871
6118
|
] });
|
|
5872
6119
|
const changePasswordContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
5873
|
-
/* @__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: [
|
|
5874
6121
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5875
|
-
|
|
6122
|
+
import_react43.IconButton,
|
|
5876
6123
|
{
|
|
5877
6124
|
size: "sm",
|
|
5878
6125
|
variant: "ghost",
|
|
@@ -5882,16 +6129,16 @@ function ReusableProfile({
|
|
|
5882
6129
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
5883
6130
|
}
|
|
5884
6131
|
),
|
|
5885
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6132
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Text, { fontWeight: "bold", fontSize: "md", children: "Change Password" })
|
|
5886
6133
|
] }) }),
|
|
5887
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5888
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5889
|
-
/* @__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" }),
|
|
5890
6137
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5891
|
-
|
|
6138
|
+
import_react43.InputGroup,
|
|
5892
6139
|
{
|
|
5893
6140
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5894
|
-
|
|
6141
|
+
import_react43.IconButton,
|
|
5895
6142
|
{
|
|
5896
6143
|
size: "xs",
|
|
5897
6144
|
variant: "ghost",
|
|
@@ -5902,7 +6149,7 @@ function ReusableProfile({
|
|
|
5902
6149
|
}
|
|
5903
6150
|
),
|
|
5904
6151
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5905
|
-
|
|
6152
|
+
import_react43.Input,
|
|
5906
6153
|
{
|
|
5907
6154
|
type: showCurrentPw ? "text" : "password",
|
|
5908
6155
|
value: currentPw,
|
|
@@ -5914,13 +6161,13 @@ function ReusableProfile({
|
|
|
5914
6161
|
}
|
|
5915
6162
|
)
|
|
5916
6163
|
] }),
|
|
5917
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5918
|
-
/* @__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" }),
|
|
5919
6166
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5920
|
-
|
|
6167
|
+
import_react43.InputGroup,
|
|
5921
6168
|
{
|
|
5922
6169
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5923
|
-
|
|
6170
|
+
import_react43.IconButton,
|
|
5924
6171
|
{
|
|
5925
6172
|
size: "xs",
|
|
5926
6173
|
variant: "ghost",
|
|
@@ -5931,7 +6178,7 @@ function ReusableProfile({
|
|
|
5931
6178
|
}
|
|
5932
6179
|
),
|
|
5933
6180
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5934
|
-
|
|
6181
|
+
import_react43.Input,
|
|
5935
6182
|
{
|
|
5936
6183
|
type: showNewPw ? "text" : "password",
|
|
5937
6184
|
value: newPw,
|
|
@@ -5942,9 +6189,9 @@ function ReusableProfile({
|
|
|
5942
6189
|
)
|
|
5943
6190
|
}
|
|
5944
6191
|
),
|
|
5945
|
-
newPw && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5946
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5947
|
-
|
|
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,
|
|
5948
6195
|
{
|
|
5949
6196
|
flex: 1,
|
|
5950
6197
|
h: "3px",
|
|
@@ -5954,16 +6201,16 @@ function ReusableProfile({
|
|
|
5954
6201
|
},
|
|
5955
6202
|
i
|
|
5956
6203
|
)) }),
|
|
5957
|
-
/* @__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 })
|
|
5958
6205
|
] })
|
|
5959
6206
|
] }),
|
|
5960
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
5961
|
-
/* @__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" }),
|
|
5962
6209
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5963
|
-
|
|
6210
|
+
import_react43.InputGroup,
|
|
5964
6211
|
{
|
|
5965
6212
|
endElement: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5966
|
-
|
|
6213
|
+
import_react43.IconButton,
|
|
5967
6214
|
{
|
|
5968
6215
|
size: "xs",
|
|
5969
6216
|
variant: "ghost",
|
|
@@ -5974,7 +6221,7 @@ function ReusableProfile({
|
|
|
5974
6221
|
}
|
|
5975
6222
|
),
|
|
5976
6223
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5977
|
-
|
|
6224
|
+
import_react43.Input,
|
|
5978
6225
|
{
|
|
5979
6226
|
type: showConfirmPw ? "text" : "password",
|
|
5980
6227
|
value: confirmPw,
|
|
@@ -5985,10 +6232,10 @@ function ReusableProfile({
|
|
|
5985
6232
|
)
|
|
5986
6233
|
}
|
|
5987
6234
|
),
|
|
5988
|
-
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" })
|
|
5989
6236
|
] }),
|
|
5990
6237
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5991
|
-
|
|
6238
|
+
import_react43.Button,
|
|
5992
6239
|
{
|
|
5993
6240
|
w: "full",
|
|
5994
6241
|
mt: 1,
|
|
@@ -6005,7 +6252,7 @@ function ReusableProfile({
|
|
|
6005
6252
|
] });
|
|
6006
6253
|
const navbarCustomizeContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
6007
6254
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6008
|
-
|
|
6255
|
+
import_react43.Box,
|
|
6009
6256
|
{
|
|
6010
6257
|
px: 4,
|
|
6011
6258
|
pt: 4,
|
|
@@ -6016,9 +6263,9 @@ function ReusableProfile({
|
|
|
6016
6263
|
top: 0,
|
|
6017
6264
|
bg: "bg",
|
|
6018
6265
|
zIndex: 1,
|
|
6019
|
-
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: [
|
|
6020
6267
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6021
|
-
|
|
6268
|
+
import_react43.IconButton,
|
|
6022
6269
|
{
|
|
6023
6270
|
size: "sm",
|
|
6024
6271
|
variant: "ghost",
|
|
@@ -6031,9 +6278,9 @@ function ReusableProfile({
|
|
|
6031
6278
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuChevronLeft, {})
|
|
6032
6279
|
}
|
|
6033
6280
|
),
|
|
6034
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6035
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6036
|
-
/* @__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: [
|
|
6037
6284
|
"Choose up to ",
|
|
6038
6285
|
maxQuickNavItems,
|
|
6039
6286
|
" shortcuts for the bottom bar"
|
|
@@ -6042,10 +6289,10 @@ function ReusableProfile({
|
|
|
6042
6289
|
] })
|
|
6043
6290
|
}
|
|
6044
6291
|
),
|
|
6045
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6046
|
-
/* @__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: [
|
|
6047
6294
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6048
|
-
|
|
6295
|
+
import_react43.Text,
|
|
6049
6296
|
{
|
|
6050
6297
|
fontSize: "xs",
|
|
6051
6298
|
fontWeight: "bold",
|
|
@@ -6056,7 +6303,7 @@ function ReusableProfile({
|
|
|
6056
6303
|
}
|
|
6057
6304
|
),
|
|
6058
6305
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6059
|
-
|
|
6306
|
+
import_react43.Text,
|
|
6060
6307
|
{
|
|
6061
6308
|
fontSize: "xs",
|
|
6062
6309
|
color: quickNavHrefs.length >= maxQuickNavItems ? "orange.500" : "gray.400",
|
|
@@ -6070,7 +6317,7 @@ function ReusableProfile({
|
|
|
6070
6317
|
)
|
|
6071
6318
|
] }),
|
|
6072
6319
|
quickNavHrefs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6073
|
-
|
|
6320
|
+
import_react43.Flex,
|
|
6074
6321
|
{
|
|
6075
6322
|
align: "center",
|
|
6076
6323
|
justify: "center",
|
|
@@ -6079,18 +6326,18 @@ function ReusableProfile({
|
|
|
6079
6326
|
borderWidth: "1px",
|
|
6080
6327
|
borderStyle: "dashed",
|
|
6081
6328
|
borderColor: "gray.200",
|
|
6082
|
-
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" })
|
|
6083
6330
|
}
|
|
6084
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6331
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.VStack, { gap: 0, children: quickNavHrefs.map((href, idx) => {
|
|
6085
6332
|
const option = availableOptions.find((item) => item.key === href);
|
|
6086
6333
|
if (!option) return null;
|
|
6087
6334
|
const ItemIcon = option.Icon;
|
|
6088
6335
|
const isFirst = idx === 0;
|
|
6089
6336
|
const isLast = idx === quickNavHrefs.length - 1;
|
|
6090
6337
|
const isReplacing = replacingIdx === idx;
|
|
6091
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Box, { w: "full", children: [
|
|
6092
6339
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6093
|
-
|
|
6340
|
+
import_react43.Flex,
|
|
6094
6341
|
{
|
|
6095
6342
|
justify: "space-between",
|
|
6096
6343
|
align: "center",
|
|
@@ -6102,9 +6349,9 @@ function ReusableProfile({
|
|
|
6102
6349
|
borderColor: isReplacing ? "orange.200" : void 0,
|
|
6103
6350
|
transition: "all 0.15s",
|
|
6104
6351
|
children: [
|
|
6105
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6352
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.Flex, { align: "center", gap: 3, children: [
|
|
6106
6353
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6107
|
-
|
|
6354
|
+
import_react43.Box,
|
|
6108
6355
|
{
|
|
6109
6356
|
w: "36px",
|
|
6110
6357
|
h: "36px",
|
|
@@ -6118,10 +6365,10 @@ function ReusableProfile({
|
|
|
6118
6365
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemIcon, { size: 15 })
|
|
6119
6366
|
}
|
|
6120
6367
|
),
|
|
6121
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6122
|
-
/* @__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 }),
|
|
6123
6370
|
isReplacing && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6124
|
-
|
|
6371
|
+
import_react43.Text,
|
|
6125
6372
|
{
|
|
6126
6373
|
fontSize: "xs",
|
|
6127
6374
|
color: "orange.500",
|
|
@@ -6131,9 +6378,9 @@ function ReusableProfile({
|
|
|
6131
6378
|
)
|
|
6132
6379
|
] })
|
|
6133
6380
|
] }),
|
|
6134
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6381
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react43.HStack, { gap: 0.5, children: [
|
|
6135
6382
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6136
|
-
|
|
6383
|
+
import_react43.IconButton,
|
|
6137
6384
|
{
|
|
6138
6385
|
size: "xs",
|
|
6139
6386
|
variant: "ghost",
|
|
@@ -6145,7 +6392,7 @@ function ReusableProfile({
|
|
|
6145
6392
|
}
|
|
6146
6393
|
),
|
|
6147
6394
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6148
|
-
|
|
6395
|
+
import_react43.IconButton,
|
|
6149
6396
|
{
|
|
6150
6397
|
size: "xs",
|
|
6151
6398
|
variant: "ghost",
|
|
@@ -6157,7 +6404,7 @@ function ReusableProfile({
|
|
|
6157
6404
|
}
|
|
6158
6405
|
),
|
|
6159
6406
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6160
|
-
|
|
6407
|
+
import_react43.IconButton,
|
|
6161
6408
|
{
|
|
6162
6409
|
size: "xs",
|
|
6163
6410
|
variant: isReplacing ? "solid" : "ghost",
|
|
@@ -6170,7 +6417,7 @@ function ReusableProfile({
|
|
|
6170
6417
|
}
|
|
6171
6418
|
),
|
|
6172
6419
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6173
|
-
|
|
6420
|
+
import_react43.IconButton,
|
|
6174
6421
|
{
|
|
6175
6422
|
size: "xs",
|
|
6176
6423
|
variant: "ghost",
|
|
@@ -6186,16 +6433,16 @@ function ReusableProfile({
|
|
|
6186
6433
|
]
|
|
6187
6434
|
}
|
|
6188
6435
|
),
|
|
6189
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6436
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {})
|
|
6190
6437
|
] }, href);
|
|
6191
6438
|
}) })
|
|
6192
6439
|
] }),
|
|
6193
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6194
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6195
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6196
|
-
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: [
|
|
6197
6444
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6198
|
-
|
|
6445
|
+
import_react43.Text,
|
|
6199
6446
|
{
|
|
6200
6447
|
fontSize: "xs",
|
|
6201
6448
|
fontWeight: "bold",
|
|
@@ -6205,7 +6452,7 @@ function ReusableProfile({
|
|
|
6205
6452
|
children: "Select Replacement"
|
|
6206
6453
|
}
|
|
6207
6454
|
),
|
|
6208
|
-
/* @__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: [
|
|
6209
6456
|
'for "',
|
|
6210
6457
|
availableOptions.find(
|
|
6211
6458
|
(item) => item.key === quickNavHrefs[replacingIdx]
|
|
@@ -6213,7 +6460,7 @@ function ReusableProfile({
|
|
|
6213
6460
|
'"'
|
|
6214
6461
|
] })
|
|
6215
6462
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6216
|
-
|
|
6463
|
+
import_react43.Text,
|
|
6217
6464
|
{
|
|
6218
6465
|
fontSize: "xs",
|
|
6219
6466
|
fontWeight: "bold",
|
|
@@ -6224,7 +6471,7 @@ function ReusableProfile({
|
|
|
6224
6471
|
}
|
|
6225
6472
|
),
|
|
6226
6473
|
replacingIdx !== null && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6227
|
-
|
|
6474
|
+
import_react43.Button,
|
|
6228
6475
|
{
|
|
6229
6476
|
size: "xs",
|
|
6230
6477
|
variant: "ghost",
|
|
@@ -6234,17 +6481,17 @@ function ReusableProfile({
|
|
|
6234
6481
|
}
|
|
6235
6482
|
)
|
|
6236
6483
|
] }),
|
|
6237
|
-
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) => {
|
|
6238
6485
|
const ItemIcon = option.Icon;
|
|
6239
6486
|
const isLast = idx === unpinnedOptions.length - 1;
|
|
6240
6487
|
const isReplacingMode = replacingIdx !== null;
|
|
6241
6488
|
const canAdd = quickNavHrefs.length < maxQuickNavItems;
|
|
6242
6489
|
const actionEnabled = isReplacingMode || canAdd;
|
|
6243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6244
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6245
|
-
/* @__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: [
|
|
6246
6493
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6247
|
-
|
|
6494
|
+
import_react43.Box,
|
|
6248
6495
|
{
|
|
6249
6496
|
w: "36px",
|
|
6250
6497
|
h: "36px",
|
|
@@ -6259,7 +6506,7 @@ function ReusableProfile({
|
|
|
6259
6506
|
}
|
|
6260
6507
|
),
|
|
6261
6508
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6262
|
-
|
|
6509
|
+
import_react43.Text,
|
|
6263
6510
|
{
|
|
6264
6511
|
fontSize: "sm",
|
|
6265
6512
|
fontWeight: "medium",
|
|
@@ -6269,7 +6516,7 @@ function ReusableProfile({
|
|
|
6269
6516
|
)
|
|
6270
6517
|
] }),
|
|
6271
6518
|
isReplacingMode ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6272
|
-
|
|
6519
|
+
import_react43.IconButton,
|
|
6273
6520
|
{
|
|
6274
6521
|
size: "xs",
|
|
6275
6522
|
variant: "outline",
|
|
@@ -6281,7 +6528,7 @@ function ReusableProfile({
|
|
|
6281
6528
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuArrowLeftRight, { size: 13 })
|
|
6282
6529
|
}
|
|
6283
6530
|
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6284
|
-
|
|
6531
|
+
import_react43.IconButton,
|
|
6285
6532
|
{
|
|
6286
6533
|
size: "xs",
|
|
6287
6534
|
variant: "outline",
|
|
@@ -6295,7 +6542,7 @@ function ReusableProfile({
|
|
|
6295
6542
|
}
|
|
6296
6543
|
)
|
|
6297
6544
|
] }),
|
|
6298
|
-
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6545
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react43.Separator, {})
|
|
6299
6546
|
] }, option.key);
|
|
6300
6547
|
}) })
|
|
6301
6548
|
] })
|
|
@@ -6303,7 +6550,7 @@ function ReusableProfile({
|
|
|
6303
6550
|
const subViewContent = profileView === "edit-account" ? editAccountContent : profileView === "change-password" ? changePasswordContent : profileView === "navbar-customize" ? navbarCustomizeContent : null;
|
|
6304
6551
|
if (isDesktop) {
|
|
6305
6552
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6306
|
-
|
|
6553
|
+
import_react43.Flex,
|
|
6307
6554
|
{
|
|
6308
6555
|
maxW: "6xl",
|
|
6309
6556
|
mx: "auto",
|
|
@@ -6314,7 +6561,7 @@ function ReusableProfile({
|
|
|
6314
6561
|
align: "start",
|
|
6315
6562
|
children: [
|
|
6316
6563
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6317
|
-
|
|
6564
|
+
import_react43.Box,
|
|
6318
6565
|
{
|
|
6319
6566
|
w: { md: "300px", lg: "340px" },
|
|
6320
6567
|
flexShrink: 0,
|
|
@@ -6329,7 +6576,7 @@ function ReusableProfile({
|
|
|
6329
6576
|
}
|
|
6330
6577
|
),
|
|
6331
6578
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6332
|
-
|
|
6579
|
+
import_react43.Box,
|
|
6333
6580
|
{
|
|
6334
6581
|
flex: "1",
|
|
6335
6582
|
minW: 0,
|
|
@@ -6340,7 +6587,7 @@ function ReusableProfile({
|
|
|
6340
6587
|
bg: "bg",
|
|
6341
6588
|
minH: "540px",
|
|
6342
6589
|
children: subViewContent ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
6343
|
-
|
|
6590
|
+
import_react43.Flex,
|
|
6344
6591
|
{
|
|
6345
6592
|
direction: "column",
|
|
6346
6593
|
align: "center",
|
|
@@ -6351,7 +6598,7 @@ function ReusableProfile({
|
|
|
6351
6598
|
color: "gray.400",
|
|
6352
6599
|
children: [
|
|
6353
6600
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
6354
|
-
|
|
6601
|
+
import_react43.Box,
|
|
6355
6602
|
{
|
|
6356
6603
|
w: "56px",
|
|
6357
6604
|
h: "56px",
|
|
@@ -6364,7 +6611,7 @@ function ReusableProfile({
|
|
|
6364
6611
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lu9.LuUser, { size: 24 })
|
|
6365
6612
|
}
|
|
6366
6613
|
),
|
|
6367
|
-
/* @__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." })
|
|
6368
6615
|
]
|
|
6369
6616
|
}
|
|
6370
6617
|
)
|
|
@@ -6374,16 +6621,20 @@ function ReusableProfile({
|
|
|
6374
6621
|
}
|
|
6375
6622
|
);
|
|
6376
6623
|
}
|
|
6377
|
-
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 });
|
|
6378
6625
|
}
|
|
6379
6626
|
var UserProfile_default = ReusableProfile;
|
|
6380
6627
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6381
6628
|
0 && (module.exports = {
|
|
6629
|
+
APIError,
|
|
6630
|
+
APPLICATION_DATA_CHANGE_EVENT,
|
|
6382
6631
|
Beneficiary,
|
|
6383
6632
|
BottomQuickActions,
|
|
6384
6633
|
DocumentUploadCard,
|
|
6634
|
+
GeoApifyService,
|
|
6385
6635
|
GetStarted,
|
|
6386
6636
|
HealthDeclaration,
|
|
6637
|
+
LIFE_PLAN_APPLICATION_KEY,
|
|
6387
6638
|
LifePlanApplication1,
|
|
6388
6639
|
LifePlanApplication2,
|
|
6389
6640
|
LifePlanApplication3,
|
|
@@ -6391,15 +6642,25 @@ var UserProfile_default = ReusableProfile;
|
|
|
6391
6642
|
LifePlanApplicationStepWrapper,
|
|
6392
6643
|
NotifyInstall,
|
|
6393
6644
|
OCR_STORAGE_KEY,
|
|
6645
|
+
OcrService,
|
|
6646
|
+
PayMongoService,
|
|
6394
6647
|
SharedLifePlanApplication,
|
|
6395
6648
|
UserProfile,
|
|
6649
|
+
api,
|
|
6650
|
+
apiClient,
|
|
6651
|
+
clearApplicationData,
|
|
6396
6652
|
clearOcrResult,
|
|
6653
|
+
configureApi,
|
|
6397
6654
|
createEmptyApplicationData,
|
|
6655
|
+
loadApplicationData,
|
|
6398
6656
|
loadApplicationDataFromLocalStorage,
|
|
6399
6657
|
markOcrApplied,
|
|
6400
6658
|
readOcrResult,
|
|
6659
|
+
saveApplicationData,
|
|
6401
6660
|
saveApplicationDataToLocalStorage,
|
|
6402
6661
|
saveOcrResult,
|
|
6662
|
+
updateApplicationData,
|
|
6663
|
+
useApplicationData,
|
|
6403
6664
|
useOcr
|
|
6404
6665
|
});
|
|
6405
6666
|
//# sourceMappingURL=index.js.map
|