@asdp/ferryui 0.1.22-dev.8990 → 0.1.22-dev.9111
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 +305 -106
- package/dist/index.d.ts +305 -106
- package/dist/index.js +535 -275
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +529 -278
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent,
|
|
1
|
+
import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Label, Text, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, Subtitle1, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, Body2, typographyStyles, Switch, Textarea, Link } from '@fluentui/react-components';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React5, { forwardRef, useState, useRef, useEffect, useCallback, useMemo, Fragment as Fragment$1 } from 'react';
|
|
4
|
-
import { Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular } from '@fluentui/react-icons';
|
|
4
|
+
import { Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular, SearchRegular } from '@fluentui/react-icons';
|
|
5
5
|
import { Container, Row, Col, Visible } from 'react-grid-system';
|
|
6
6
|
import { Icon } from '@iconify/react';
|
|
7
7
|
import { Controller, useForm, useWatch } from 'react-hook-form';
|
|
@@ -335,6 +335,128 @@ var extendedTokens = {
|
|
|
335
335
|
colorBrandForegroundLinkHover: customBrand[120],
|
|
336
336
|
colorBrandForegroundLinkPressed: customBrand[130],
|
|
337
337
|
colorBrandForegroundLinkSelected: customBrand[110]});
|
|
338
|
+
|
|
339
|
+
// src/constants/api.ts
|
|
340
|
+
var API_ENDPOINTS = {
|
|
341
|
+
PORTS: {
|
|
342
|
+
ORIGIN: "/v1/surrounding/catalog/ports/list/origin",
|
|
343
|
+
DESTINATION: "/v1/surrounding/catalog/ports/list/destination"
|
|
344
|
+
},
|
|
345
|
+
SERVICES: {
|
|
346
|
+
LIST: "/v1/surrounding/catalog/service-types"
|
|
347
|
+
},
|
|
348
|
+
PASSENGERS: {
|
|
349
|
+
LIST: "/v1/surrounding/catalog/passenger-types"
|
|
350
|
+
},
|
|
351
|
+
// Authentication endpoints
|
|
352
|
+
AUTH: {
|
|
353
|
+
LOGIN: "/v1/surrounding/auth/login",
|
|
354
|
+
REGISTER: "/auth/register",
|
|
355
|
+
LOGOUT: "/auth/logout",
|
|
356
|
+
REFRESH: "/auth/refresh",
|
|
357
|
+
PROFILE: "/auth/profile",
|
|
358
|
+
UPDATE_PROFILE: "/auth/profile",
|
|
359
|
+
CHANGE_PASSWORD: "/auth/change-password",
|
|
360
|
+
FORGOT_PASSWORD: "/auth/forgot-password",
|
|
361
|
+
RESET_PASSWORD: "/auth/reset-password",
|
|
362
|
+
VERIFY_EMAIL: "/auth/verify-email"
|
|
363
|
+
},
|
|
364
|
+
// User management
|
|
365
|
+
USERS: {
|
|
366
|
+
LIST: "/users",
|
|
367
|
+
CREATE: "/users",
|
|
368
|
+
DETAIL: (id) => `/users/${id}`,
|
|
369
|
+
UPDATE: (id) => `/users/${id}`,
|
|
370
|
+
DELETE: (id) => `/users/${id}`,
|
|
371
|
+
AVATAR: (id) => `/users/${id}/avatar`
|
|
372
|
+
},
|
|
373
|
+
// File management
|
|
374
|
+
FILES: {
|
|
375
|
+
UPLOAD: "/files/upload",
|
|
376
|
+
DOWNLOAD: (id) => `/files/${id}/download`,
|
|
377
|
+
DELETE: (id) => `/files/${id}`,
|
|
378
|
+
LIST: "/files"
|
|
379
|
+
},
|
|
380
|
+
// Dashboard/Analytics
|
|
381
|
+
DASHBOARD: {
|
|
382
|
+
STATS: "/dashboard/stats",
|
|
383
|
+
CHART_DATA: "/dashboard/chart-data",
|
|
384
|
+
RECENT_ACTIVITIES: "/dashboard/recent-activities"
|
|
385
|
+
},
|
|
386
|
+
// Notifications
|
|
387
|
+
NOTIFICATIONS: {
|
|
388
|
+
LIST: "/notifications",
|
|
389
|
+
MARK_READ: (id) => `/notifications/${id}/read`,
|
|
390
|
+
MARK_ALL_READ: "/notifications/read-all",
|
|
391
|
+
DELETE: (id) => `/notifications/${id}`,
|
|
392
|
+
SETTINGS: "/notifications/settings"
|
|
393
|
+
},
|
|
394
|
+
// Settings
|
|
395
|
+
SETTINGS: {
|
|
396
|
+
GENERAL: "/settings/general",
|
|
397
|
+
SECURITY: "/settings/security",
|
|
398
|
+
PREFERENCES: "/settings/preferences"
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
var API_CONFIG = {
|
|
402
|
+
TIMEOUT: 3e4,
|
|
403
|
+
RETRY_ATTEMPTS: 3,
|
|
404
|
+
RETRY_DELAY: 1e3,
|
|
405
|
+
CACHE_TIME: 5 * 60 * 1e3,
|
|
406
|
+
// 5 minutes
|
|
407
|
+
STALE_TIME: 2 * 60 * 1e3
|
|
408
|
+
// 2 minutes
|
|
409
|
+
};
|
|
410
|
+
var API_ERROR_MESSAGES = {
|
|
411
|
+
NETWORK_ERROR: "Network error occurred. Please check your connection.",
|
|
412
|
+
TIMEOUT_ERROR: "Request timeout. Please try again.",
|
|
413
|
+
UNAUTHORIZED: "You are not authorized to perform this action.",
|
|
414
|
+
FORBIDDEN: "Access denied.",
|
|
415
|
+
NOT_FOUND: "Resource not found.",
|
|
416
|
+
SERVER_ERROR: "Internal server error. Please try again later.",
|
|
417
|
+
VALIDATION_ERROR: "Please check your input and try again.",
|
|
418
|
+
TOKEN_EXPIRED: "Your session has expired. Please login again.",
|
|
419
|
+
RATE_LIMIT: "Too many requests. Please try again later."
|
|
420
|
+
};
|
|
421
|
+
var HTTP_STATUS = {
|
|
422
|
+
OK: 200,
|
|
423
|
+
CREATED: 201,
|
|
424
|
+
NO_CONTENT: 204,
|
|
425
|
+
BAD_REQUEST: 400,
|
|
426
|
+
UNAUTHORIZED: 401,
|
|
427
|
+
FORBIDDEN: 403,
|
|
428
|
+
NOT_FOUND: 404,
|
|
429
|
+
CONFLICT: 409,
|
|
430
|
+
UNPROCESSABLE_ENTITY: 422,
|
|
431
|
+
TOO_MANY_REQUESTS: 429,
|
|
432
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
433
|
+
BAD_GATEWAY: 502,
|
|
434
|
+
SERVICE_UNAVAILABLE: 503
|
|
435
|
+
};
|
|
436
|
+
var PASSENGER_TYPE = {
|
|
437
|
+
ADULT: 1,
|
|
438
|
+
CHILD: 2,
|
|
439
|
+
INFANT: 3,
|
|
440
|
+
ELDERLY: 5
|
|
441
|
+
};
|
|
442
|
+
var IDENTITY_TYPE = {
|
|
443
|
+
KTP: 1,
|
|
444
|
+
SIM: 2,
|
|
445
|
+
PSP: 3,
|
|
446
|
+
TGL: 4
|
|
447
|
+
};
|
|
448
|
+
var LOAD_TYPE = {
|
|
449
|
+
PEDESTRIAN: 1,
|
|
450
|
+
MOTORBIKE: 2,
|
|
451
|
+
PASSENGER_VEHICLE: 3,
|
|
452
|
+
GOODS_VEHICLE: 4,
|
|
453
|
+
LOOSE_LOAD_WITH_VEHICLE: 5,
|
|
454
|
+
LOOSE_LOAD_WITHOUT_VEHICLE: 6
|
|
455
|
+
};
|
|
456
|
+
var GENDER = {
|
|
457
|
+
MALE: "M",
|
|
458
|
+
FEMALE: "F"
|
|
459
|
+
};
|
|
338
460
|
var useStyles2 = makeStyles({
|
|
339
461
|
carousel: {},
|
|
340
462
|
carouselContainer: {
|
|
@@ -924,6 +1046,15 @@ var DEFAULT_LABELS5 = {
|
|
|
924
1046
|
logoAlt: "ASDP Logo"
|
|
925
1047
|
}
|
|
926
1048
|
};
|
|
1049
|
+
|
|
1050
|
+
// src/utils/format.ts
|
|
1051
|
+
function formatDuration(minutes) {
|
|
1052
|
+
const hours = Math.floor(minutes / 60);
|
|
1053
|
+
const mins = minutes % 60;
|
|
1054
|
+
if (hours && mins) return `${hours} jam ${mins} menit`;
|
|
1055
|
+
if (hours) return `${hours} jam`;
|
|
1056
|
+
return `${mins} menit`;
|
|
1057
|
+
}
|
|
927
1058
|
var useStyles5 = makeStyles({
|
|
928
1059
|
dividerContainer: {
|
|
929
1060
|
position: "relative",
|
|
@@ -961,12 +1092,12 @@ var useStyles5 = makeStyles({
|
|
|
961
1092
|
},
|
|
962
1093
|
circularLeft: {
|
|
963
1094
|
position: "absolute",
|
|
964
|
-
width: "
|
|
965
|
-
height: "
|
|
1095
|
+
width: "80px",
|
|
1096
|
+
height: "80px",
|
|
966
1097
|
borderRadius: "50%",
|
|
967
1098
|
backgroundColor: tokens.colorNeutralBackground1Hover,
|
|
968
|
-
left: "-50px"
|
|
969
|
-
boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)"
|
|
1099
|
+
left: "-50px"
|
|
1100
|
+
// boxShadow: "inset -3px 0px 1px rgba(0, 0, 0, 0.1)",
|
|
970
1101
|
},
|
|
971
1102
|
ticketMiddleCard: {
|
|
972
1103
|
width: "100%",
|
|
@@ -1071,12 +1202,12 @@ var useStyles5 = makeStyles({
|
|
|
1071
1202
|
},
|
|
1072
1203
|
circularRight: {
|
|
1073
1204
|
position: "absolute",
|
|
1074
|
-
width: "
|
|
1075
|
-
height: "
|
|
1205
|
+
width: "80px",
|
|
1206
|
+
height: "80px",
|
|
1076
1207
|
borderRadius: "50%",
|
|
1077
1208
|
backgroundColor: tokens.colorNeutralBackground1Hover,
|
|
1078
|
-
right: "-50px"
|
|
1079
|
-
boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)"
|
|
1209
|
+
right: "-50px"
|
|
1210
|
+
// boxShadow: "inset 3px 0px 1px rgba(0, 0, 0, 0.1)",
|
|
1080
1211
|
},
|
|
1081
1212
|
ticketWrapper: {
|
|
1082
1213
|
borderRadius: tokens.borderRadiusXLarge,
|
|
@@ -1122,21 +1253,8 @@ var useStyles5 = makeStyles({
|
|
|
1122
1253
|
var CardTicket = ({
|
|
1123
1254
|
language = "id",
|
|
1124
1255
|
labels,
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
shipType,
|
|
1128
|
-
shipTypeColor = "success",
|
|
1129
|
-
tooltipCaption = "",
|
|
1130
|
-
availableSeats,
|
|
1131
|
-
departureDay,
|
|
1132
|
-
departureTime,
|
|
1133
|
-
departureLocation,
|
|
1134
|
-
arrivalDay,
|
|
1135
|
-
arrivalTime,
|
|
1136
|
-
arrivalLocation,
|
|
1137
|
-
duration,
|
|
1138
|
-
facilities,
|
|
1139
|
-
totalPrice,
|
|
1256
|
+
routeItem,
|
|
1257
|
+
departureItem,
|
|
1140
1258
|
buttonText,
|
|
1141
1259
|
onPriceDetailClick,
|
|
1142
1260
|
onPolicyClick,
|
|
@@ -1146,8 +1264,8 @@ var CardTicket = ({
|
|
|
1146
1264
|
const { width } = useWindowSize();
|
|
1147
1265
|
const mergedLabels = { ...DEFAULT_LABELS5[language], ...labels };
|
|
1148
1266
|
const getCircularVerticalConfig = () => {
|
|
1149
|
-
if (width <= 1600) return { count:
|
|
1150
|
-
return { count:
|
|
1267
|
+
if (width <= 1600) return { count: 3, spacing: 120, top: 25 };
|
|
1268
|
+
return { count: 3, spacing: 100, top: 25 };
|
|
1151
1269
|
};
|
|
1152
1270
|
const circularVerticalConfig = getCircularVerticalConfig();
|
|
1153
1271
|
return /* @__PURE__ */ jsxs(Row, { className: styles.ticketWrapper, children: [
|
|
@@ -1182,7 +1300,7 @@ var CardTicket = ({
|
|
|
1182
1300
|
children: /* @__PURE__ */ jsx(
|
|
1183
1301
|
Tooltip,
|
|
1184
1302
|
{
|
|
1185
|
-
content:
|
|
1303
|
+
content: departureItem?.provider?.description,
|
|
1186
1304
|
relationship: "label",
|
|
1187
1305
|
appearance: "inverted",
|
|
1188
1306
|
children: /* @__PURE__ */ jsx(
|
|
@@ -1190,11 +1308,11 @@ var CardTicket = ({
|
|
|
1190
1308
|
{
|
|
1191
1309
|
size: "large",
|
|
1192
1310
|
appearance: "filled",
|
|
1193
|
-
|
|
1311
|
+
style: { backgroundColor: departureItem?.provider?.serviceColor },
|
|
1194
1312
|
iconPosition: "before",
|
|
1195
1313
|
shape: "rounded",
|
|
1196
1314
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:info-24-regular" }),
|
|
1197
|
-
children:
|
|
1315
|
+
children: departureItem?.provider?.service
|
|
1198
1316
|
}
|
|
1199
1317
|
)
|
|
1200
1318
|
}
|
|
@@ -1219,7 +1337,7 @@ var CardTicket = ({
|
|
|
1219
1337
|
children: /* @__PURE__ */ jsx(
|
|
1220
1338
|
"img",
|
|
1221
1339
|
{
|
|
1222
|
-
src:
|
|
1340
|
+
src: departureItem?.provider?.logo,
|
|
1223
1341
|
className: styles.asdpLogo,
|
|
1224
1342
|
alt: mergedLabels.logoAlt,
|
|
1225
1343
|
height: 56,
|
|
@@ -1248,17 +1366,17 @@ var CardTicket = ({
|
|
|
1248
1366
|
{
|
|
1249
1367
|
size: "large",
|
|
1250
1368
|
style: {
|
|
1251
|
-
color:
|
|
1369
|
+
color: departureItem?.availableTicket > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
|
|
1252
1370
|
},
|
|
1253
1371
|
appearance: "tint",
|
|
1254
|
-
color:
|
|
1372
|
+
color: departureItem?.availableTicket > 50 ? "success" : "danger",
|
|
1255
1373
|
iconPosition: "after",
|
|
1256
1374
|
shape: "rounded",
|
|
1257
1375
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
|
|
1258
1376
|
children: [
|
|
1259
1377
|
mergedLabels.availableSeatsLabel,
|
|
1260
1378
|
" ",
|
|
1261
|
-
|
|
1379
|
+
departureItem?.availableTicket
|
|
1262
1380
|
]
|
|
1263
1381
|
}
|
|
1264
1382
|
)
|
|
@@ -1275,7 +1393,7 @@ var CardTicket = ({
|
|
|
1275
1393
|
xl: 12,
|
|
1276
1394
|
xxl: 12,
|
|
1277
1395
|
xxxl: 12,
|
|
1278
|
-
children: /* @__PURE__ */ jsx(Subtitle2, { children:
|
|
1396
|
+
children: /* @__PURE__ */ jsx(Subtitle2, { children: departureItem?.provider?.name })
|
|
1279
1397
|
}
|
|
1280
1398
|
)
|
|
1281
1399
|
] }),
|
|
@@ -1315,46 +1433,42 @@ var CardTicket = ({
|
|
|
1315
1433
|
{
|
|
1316
1434
|
size: "extra-large",
|
|
1317
1435
|
style: {
|
|
1318
|
-
color:
|
|
1436
|
+
color: departureItem?.availableTicket > 50 ? sharedColors.Shared_Green_Primary : sharedColors.Shared_Red_Primary
|
|
1319
1437
|
},
|
|
1320
1438
|
appearance: "tint",
|
|
1321
|
-
color:
|
|
1439
|
+
color: departureItem?.availableTicket > 50 ? "success" : "danger",
|
|
1322
1440
|
iconPosition: "after",
|
|
1323
1441
|
shape: "rounded",
|
|
1324
1442
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:ticket-diagonal-24-regular" }),
|
|
1325
1443
|
children: [
|
|
1326
1444
|
mergedLabels.availableSeatsLabel,
|
|
1327
1445
|
" ",
|
|
1328
|
-
|
|
1446
|
+
departureItem?.availableTicket
|
|
1329
1447
|
]
|
|
1330
1448
|
}
|
|
1331
1449
|
) }),
|
|
1332
1450
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", { className: styles.ticketInfo, children: [
|
|
1333
1451
|
/* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
|
|
1334
|
-
/* @__PURE__ */ jsx(Caption1, { children:
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
|
|
1337
|
-
" ",
|
|
1338
|
-
mergedLabels.timezoneLabel
|
|
1339
|
-
] }),
|
|
1340
|
-
/* @__PURE__ */ jsx(Caption1, { children: departureLocation })
|
|
1452
|
+
/* @__PURE__ */ jsx(Caption1, { children: "KAMIS" }),
|
|
1453
|
+
/* @__PURE__ */ jsx(Title2, { children: departureItem?.departureTime }),
|
|
1454
|
+
/* @__PURE__ */ jsx(Caption1, { children: routeItem?.portFrom + ", " + routeItem?.branchFrom })
|
|
1341
1455
|
] }),
|
|
1342
1456
|
/* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
|
|
1343
1457
|
/* @__PURE__ */ jsxs(Caption2, { children: [
|
|
1344
1458
|
mergedLabels.estimationPrefix,
|
|
1345
1459
|
" ",
|
|
1346
|
-
|
|
1460
|
+
formatDuration(departureItem?.estimatedSailingMinute)
|
|
1347
1461
|
] }),
|
|
1348
1462
|
/* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, { children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular", height: 24 }) }) })
|
|
1349
1463
|
] }),
|
|
1350
1464
|
/* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
|
|
1351
|
-
/* @__PURE__ */ jsx(Caption1, { children:
|
|
1465
|
+
/* @__PURE__ */ jsx(Caption1, { children: "KAMIS" }),
|
|
1352
1466
|
/* @__PURE__ */ jsxs(Title2, { children: [
|
|
1353
|
-
|
|
1467
|
+
departureItem?.arrivedTime,
|
|
1354
1468
|
" ",
|
|
1355
1469
|
mergedLabels.timezoneLabel
|
|
1356
1470
|
] }),
|
|
1357
|
-
/* @__PURE__ */ jsx(Caption1, { children:
|
|
1471
|
+
/* @__PURE__ */ jsx(Caption1, { children: routeItem?.portTo + ", " + routeItem?.branchTo })
|
|
1358
1472
|
] })
|
|
1359
1473
|
] }) }),
|
|
1360
1474
|
/* @__PURE__ */ jsxs("div", { className: styles.ticketButtons, children: [
|
|
@@ -1370,7 +1484,7 @@ var CardTicket = ({
|
|
|
1370
1484
|
},
|
|
1371
1485
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:money-24-regular" }),
|
|
1372
1486
|
size: "medium",
|
|
1373
|
-
onClick: onPriceDetailClick,
|
|
1487
|
+
onClick: () => onPriceDetailClick(departureItem?.billingDetail, departureItem?.provider),
|
|
1374
1488
|
children: mergedLabels.priceDetailsButton
|
|
1375
1489
|
}
|
|
1376
1490
|
),
|
|
@@ -1428,9 +1542,7 @@ var CardTicket = ({
|
|
|
1428
1542
|
children: [
|
|
1429
1543
|
mergedLabels.currencySymbol,
|
|
1430
1544
|
"\xA0",
|
|
1431
|
-
|
|
1432
|
-
language === "id" ? "id-ID" : "en-US"
|
|
1433
|
-
)
|
|
1545
|
+
departureItem?.billingDetail?.total?.formatted
|
|
1434
1546
|
]
|
|
1435
1547
|
}
|
|
1436
1548
|
)
|
|
@@ -1452,7 +1564,7 @@ var CardTicket = ({
|
|
|
1452
1564
|
] }),
|
|
1453
1565
|
/* @__PURE__ */ jsxs("div", { className: styles.facilitiesSection, children: [
|
|
1454
1566
|
/* @__PURE__ */ jsx(Subtitle2, { children: mergedLabels.facilitiesLabel }),
|
|
1455
|
-
/* @__PURE__ */ jsx("div", { className: styles.facilitiesList, children: facilities.map((facility, idx) => /* @__PURE__ */ jsxs("div", { className: styles.facilityItem, children: [
|
|
1567
|
+
/* @__PURE__ */ jsx("div", { className: styles.facilitiesList, children: departureItem?.provider?.facilities.map((facility, idx) => /* @__PURE__ */ jsxs("div", { className: styles.facilityItem, children: [
|
|
1456
1568
|
/* @__PURE__ */ jsx(Icon, { icon: "fluent:checkmark-circle-24-filled" }),
|
|
1457
1569
|
/* @__PURE__ */ jsx(Caption1Strong, { children: facility })
|
|
1458
1570
|
] }, idx)) })
|
|
@@ -1790,6 +1902,12 @@ var useStyles6 = makeStyles({
|
|
|
1790
1902
|
fontSize: tokens.fontSizeBase200,
|
|
1791
1903
|
fontWeight: tokens.fontWeightRegular,
|
|
1792
1904
|
color: tokens.colorNeutralForeground2,
|
|
1905
|
+
// truncate text with ellipsis 2 line
|
|
1906
|
+
display: "-webkit-box",
|
|
1907
|
+
WebkitLineClamp: 2,
|
|
1908
|
+
WebkitBoxOrient: "vertical",
|
|
1909
|
+
overflow: "hidden",
|
|
1910
|
+
textOverflow: "ellipsis",
|
|
1793
1911
|
lineHeight: "1.4",
|
|
1794
1912
|
"@media (max-width: 1200px)": {
|
|
1795
1913
|
fontSize: tokens.fontSizeBase100,
|
|
@@ -1831,10 +1949,23 @@ var CardServiceMenu = ({
|
|
|
1831
1949
|
onClick: () => onServiceClick?.(item.id),
|
|
1832
1950
|
"aria-label": item.name,
|
|
1833
1951
|
children: [
|
|
1834
|
-
/* @__PURE__ */ jsx(
|
|
1952
|
+
/* @__PURE__ */ jsx(
|
|
1953
|
+
"img",
|
|
1954
|
+
{
|
|
1955
|
+
src: item.imageUrl,
|
|
1956
|
+
alt: item.name,
|
|
1957
|
+
className: styles.logo
|
|
1958
|
+
}
|
|
1959
|
+
),
|
|
1835
1960
|
/* @__PURE__ */ jsxs("div", { className: styles.textContent, children: [
|
|
1836
1961
|
/* @__PURE__ */ jsx("span", { className: styles.label, children: item.name }),
|
|
1837
|
-
showDescriptions && /* @__PURE__ */ jsx(
|
|
1962
|
+
showDescriptions && /* @__PURE__ */ jsx(
|
|
1963
|
+
MenuItemDescription,
|
|
1964
|
+
{
|
|
1965
|
+
description: item.description,
|
|
1966
|
+
className: styles.description
|
|
1967
|
+
}
|
|
1968
|
+
)
|
|
1838
1969
|
] })
|
|
1839
1970
|
]
|
|
1840
1971
|
}
|
|
@@ -1846,6 +1977,40 @@ var CardServiceMenu = ({
|
|
|
1846
1977
|
] }, item.id);
|
|
1847
1978
|
}) }) });
|
|
1848
1979
|
};
|
|
1980
|
+
function useIsClamped(deps) {
|
|
1981
|
+
const ref = useRef(null);
|
|
1982
|
+
const [isClamped, setIsClamped] = useState(false);
|
|
1983
|
+
useEffect(() => {
|
|
1984
|
+
const el = ref.current;
|
|
1985
|
+
if (!el) return;
|
|
1986
|
+
const check = () => setIsClamped(el.scrollHeight > el.clientHeight);
|
|
1987
|
+
const timer = setTimeout(check, 0);
|
|
1988
|
+
const observer = new ResizeObserver(check);
|
|
1989
|
+
observer.observe(el);
|
|
1990
|
+
return () => {
|
|
1991
|
+
clearTimeout(timer);
|
|
1992
|
+
observer.disconnect();
|
|
1993
|
+
};
|
|
1994
|
+
}, deps ?? []);
|
|
1995
|
+
return { ref, isClamped };
|
|
1996
|
+
}
|
|
1997
|
+
var MenuItemDescription = ({ description, className }) => {
|
|
1998
|
+
const { ref, isClamped } = useIsClamped([description]);
|
|
1999
|
+
console.log({ isClamped, ref });
|
|
2000
|
+
if (isClamped) {
|
|
2001
|
+
return /* @__PURE__ */ jsx(
|
|
2002
|
+
Tooltip,
|
|
2003
|
+
{
|
|
2004
|
+
appearance: "inverted",
|
|
2005
|
+
content: description,
|
|
2006
|
+
relationship: "label",
|
|
2007
|
+
positioning: "after",
|
|
2008
|
+
children: /* @__PURE__ */ jsx("span", { ref, className, children: description })
|
|
2009
|
+
}
|
|
2010
|
+
);
|
|
2011
|
+
}
|
|
2012
|
+
return /* @__PURE__ */ jsx("span", { ref, className, children: description });
|
|
2013
|
+
};
|
|
1849
2014
|
var DatePickerInput = forwardRef(
|
|
1850
2015
|
({
|
|
1851
2016
|
field,
|
|
@@ -2138,6 +2303,7 @@ var useStyles7 = makeStyles({
|
|
|
2138
2303
|
border: `1px solid ${tokens.colorNeutralStroke1}`,
|
|
2139
2304
|
borderRadius: tokens.borderRadiusMedium,
|
|
2140
2305
|
padding: tokens.spacingVerticalS,
|
|
2306
|
+
borderBottom: `1px solid ${tokens.colorNeutralForeground3}`,
|
|
2141
2307
|
paddingLeft: "48px",
|
|
2142
2308
|
// fontSize: tokens.fontSizeBase300,
|
|
2143
2309
|
fontFamily: tokens.fontFamilyBase,
|
|
@@ -2151,10 +2317,11 @@ var useStyles7 = makeStyles({
|
|
|
2151
2317
|
// fontSize: tokens.fontSizeBase400,
|
|
2152
2318
|
},
|
|
2153
2319
|
"& .react-tel-input .form-control:hover": {
|
|
2154
|
-
border: `1px solid ${tokens.colorNeutralStroke1Hover}
|
|
2320
|
+
border: `1px solid ${tokens.colorNeutralStroke1Hover}`,
|
|
2321
|
+
borderBottom: `1px solid ${tokens.colorNeutralForeground3Hover}`
|
|
2155
2322
|
},
|
|
2156
2323
|
"& .react-tel-input .form-control:focus": {
|
|
2157
|
-
borderBottom: `2px solid ${tokens.colorBrandStroke1}`
|
|
2324
|
+
borderBottom: `2px solid ${tokens.colorBrandStroke1} !important`
|
|
2158
2325
|
// boxShadow: `0 0 0 1px ${tokens.colorBrandStroke1}`,
|
|
2159
2326
|
},
|
|
2160
2327
|
"& .react-tel-input .form-control:disabled": {
|
|
@@ -2179,6 +2346,77 @@ var useStyles7 = makeStyles({
|
|
|
2179
2346
|
backgroundColor: "transparent"
|
|
2180
2347
|
}
|
|
2181
2348
|
},
|
|
2349
|
+
// Appearance: underline
|
|
2350
|
+
phoneInputUnderline: {
|
|
2351
|
+
"& .react-tel-input .form-control": {
|
|
2352
|
+
border: "none",
|
|
2353
|
+
borderBottom: `1px solid ${tokens.colorNeutralForeground3}`,
|
|
2354
|
+
borderRadius: 0,
|
|
2355
|
+
backgroundColor: "transparent",
|
|
2356
|
+
paddingLeft: "48px"
|
|
2357
|
+
},
|
|
2358
|
+
"& .react-tel-input .form-control:hover": {
|
|
2359
|
+
border: "none",
|
|
2360
|
+
borderBottom: `1px solid ${tokens.colorNeutralForeground3Hover}`
|
|
2361
|
+
},
|
|
2362
|
+
"& .react-tel-input .form-control:focus": {
|
|
2363
|
+
border: "none",
|
|
2364
|
+
borderBottom: `2px solid ${tokens.colorBrandStroke1}`,
|
|
2365
|
+
boxShadow: "none"
|
|
2366
|
+
},
|
|
2367
|
+
"& .react-tel-input .flag-dropdown": {
|
|
2368
|
+
border: "none",
|
|
2369
|
+
backgroundColor: "transparent"
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
// Appearance: filled-darker
|
|
2373
|
+
phoneInputFilledDarker: {
|
|
2374
|
+
"& .react-tel-input .form-control": {
|
|
2375
|
+
border: "none",
|
|
2376
|
+
borderBottom: `1px solid transparent`,
|
|
2377
|
+
borderRadius: `${tokens.borderRadiusMedium} ${tokens.borderRadiusMedium} 0 0`,
|
|
2378
|
+
backgroundColor: tokens.colorNeutralBackground3,
|
|
2379
|
+
paddingLeft: "48px"
|
|
2380
|
+
},
|
|
2381
|
+
"& .react-tel-input .form-control:hover": {
|
|
2382
|
+
border: "none",
|
|
2383
|
+
borderBottom: `1px solid transparent`,
|
|
2384
|
+
backgroundColor: tokens.colorNeutralBackground3Hover
|
|
2385
|
+
},
|
|
2386
|
+
"& .react-tel-input .form-control:focus": {
|
|
2387
|
+
border: "none",
|
|
2388
|
+
borderBottom: `2px solid ${tokens.colorBrandStroke1}`,
|
|
2389
|
+
boxShadow: "none"
|
|
2390
|
+
},
|
|
2391
|
+
"& .react-tel-input .flag-dropdown": {
|
|
2392
|
+
border: "none",
|
|
2393
|
+
backgroundColor: "transparent"
|
|
2394
|
+
}
|
|
2395
|
+
},
|
|
2396
|
+
// Appearance: filled-lighter
|
|
2397
|
+
phoneInputFilledLighter: {
|
|
2398
|
+
"& .react-tel-input .form-control": {
|
|
2399
|
+
border: "none",
|
|
2400
|
+
borderBottom: `1px solid transparent`,
|
|
2401
|
+
borderRadius: `${tokens.borderRadiusMedium} ${tokens.borderRadiusMedium} 0 0`,
|
|
2402
|
+
backgroundColor: tokens.colorNeutralBackground1,
|
|
2403
|
+
paddingLeft: "48px"
|
|
2404
|
+
},
|
|
2405
|
+
"& .react-tel-input .form-control:hover": {
|
|
2406
|
+
border: "none",
|
|
2407
|
+
borderBottom: `1px solid transparent`,
|
|
2408
|
+
backgroundColor: tokens.colorNeutralBackground1Hover
|
|
2409
|
+
},
|
|
2410
|
+
"& .react-tel-input .form-control:focus": {
|
|
2411
|
+
border: "none",
|
|
2412
|
+
borderBottom: `2px solid ${tokens.colorBrandStroke1}`,
|
|
2413
|
+
boxShadow: "none"
|
|
2414
|
+
},
|
|
2415
|
+
"& .react-tel-input .flag-dropdown": {
|
|
2416
|
+
border: "none",
|
|
2417
|
+
backgroundColor: "transparent"
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2182
2420
|
phoneInputError: {
|
|
2183
2421
|
"& .react-tel-input .form-control": {
|
|
2184
2422
|
border: `2px solid ${tokens.colorPaletteRedBorder2}`
|
|
@@ -2501,6 +2739,13 @@ var InputDynamic = ({
|
|
|
2501
2739
|
};
|
|
2502
2740
|
const renderInput = (field, error) => {
|
|
2503
2741
|
const shouldTransparentBorder = disabled && appearance !== "outline" && appearance !== "underline";
|
|
2742
|
+
const getPhoneAppearanceClass = () => {
|
|
2743
|
+
if (appearance === "underline") return styles.phoneInputUnderline;
|
|
2744
|
+
if (appearance === "filled-darker") return styles.phoneInputFilledDarker;
|
|
2745
|
+
if (appearance === "filled-lighter") return styles.phoneInputFilledLighter;
|
|
2746
|
+
return "";
|
|
2747
|
+
};
|
|
2748
|
+
const phoneAppearanceClass = getPhoneAppearanceClass();
|
|
2504
2749
|
const inputStyle = shouldTransparentBorder ? { ...style, border: "transparent" } : style;
|
|
2505
2750
|
const handleInputChange = (e) => {
|
|
2506
2751
|
field.onChange(e);
|
|
@@ -2528,6 +2773,12 @@ var InputDynamic = ({
|
|
|
2528
2773
|
const otpIndex2 = otpMatch ? parseInt(otpMatch[1], 10) : null;
|
|
2529
2774
|
const classNameSize = size === "small" ? styles.valueSmall : size === "medium" ? styles.valueMedium : styles.valueLarge;
|
|
2530
2775
|
const fontSizeValuePhoneInput = size == "small" ? tokens.fontSizeBase200 : size === "medium" ? tokens.fontSizeBase300 : tokens.fontSizeBase400;
|
|
2776
|
+
const phoneInputSizeStyle = {
|
|
2777
|
+
fontSize: fontSizeValuePhoneInput,
|
|
2778
|
+
...size === "small" && { minHeight: "26px", height: "26px", padding: `0 ${tokens.spacingHorizontalS} 0 48px` },
|
|
2779
|
+
...size === "medium" && { minHeight: "34px", height: "34px", padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXXS} 48px` },
|
|
2780
|
+
...size === "large" && { minHeight: "40px", height: "40px", padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} 48px` }
|
|
2781
|
+
};
|
|
2531
2782
|
if (type === "emailOrPhone") {
|
|
2532
2783
|
updateEmailOrPhoneType(field.value);
|
|
2533
2784
|
const stringValue = typeof field.value === "string" ? field.value : "";
|
|
@@ -2563,13 +2814,11 @@ var InputDynamic = ({
|
|
|
2563
2814
|
"div",
|
|
2564
2815
|
{
|
|
2565
2816
|
ref: emailOrPhoneInputRef,
|
|
2566
|
-
className:
|
|
2817
|
+
className: mergeClasses(styles.phoneInputWrapper, phoneAppearanceClass, error ? styles.phoneInputError : ""),
|
|
2567
2818
|
children: /* @__PURE__ */ jsx(
|
|
2568
2819
|
PhoneInput,
|
|
2569
2820
|
{
|
|
2570
|
-
inputStyle:
|
|
2571
|
-
fontSize: fontSizeValuePhoneInput
|
|
2572
|
-
},
|
|
2821
|
+
inputStyle: phoneInputSizeStyle,
|
|
2573
2822
|
country: defaultCountry.toLowerCase(),
|
|
2574
2823
|
value: stringValue.startsWith("+") ? stringValue.substring(1) : stringValue,
|
|
2575
2824
|
onChange: (value, data) => {
|
|
@@ -2668,7 +2917,7 @@ var InputDynamic = ({
|
|
|
2668
2917
|
"div",
|
|
2669
2918
|
{
|
|
2670
2919
|
ref: phoneInputRef,
|
|
2671
|
-
className:
|
|
2920
|
+
className: mergeClasses(styles.phoneInputWrapper, phoneAppearanceClass, error ? styles.phoneInputError : ""),
|
|
2672
2921
|
children: /* @__PURE__ */ jsx(
|
|
2673
2922
|
PhoneInput,
|
|
2674
2923
|
{
|
|
@@ -2710,9 +2959,7 @@ var InputDynamic = ({
|
|
|
2710
2959
|
disabled,
|
|
2711
2960
|
enableSearch: true,
|
|
2712
2961
|
disableSearchIcon: true,
|
|
2713
|
-
inputStyle:
|
|
2714
|
-
fontSize: fontSizeValuePhoneInput
|
|
2715
|
-
}
|
|
2962
|
+
inputStyle: phoneInputSizeStyle
|
|
2716
2963
|
}
|
|
2717
2964
|
)
|
|
2718
2965
|
}
|
|
@@ -2795,7 +3042,7 @@ var InputDynamic = ({
|
|
|
2795
3042
|
name: `${String(name)}_${Math.random().toString(36).substring(7)}`,
|
|
2796
3043
|
isDisabled: disabled,
|
|
2797
3044
|
placeholder: placeholder || "Select country",
|
|
2798
|
-
options: COUNTRIES,
|
|
3045
|
+
options: options && options.length > 0 ? options : COUNTRIES,
|
|
2799
3046
|
styles: getSelectStyles(!!error),
|
|
2800
3047
|
className: mergeClasses(styles.reactSelect, classNameSize),
|
|
2801
3048
|
classNamePrefix: "react-select",
|
|
@@ -2819,7 +3066,7 @@ var InputDynamic = ({
|
|
|
2819
3066
|
{
|
|
2820
3067
|
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
2821
3068
|
children: [
|
|
2822
|
-
/* @__PURE__ */ jsx(Icon, { icon: option.flag, width: 20, height: 20 }),
|
|
3069
|
+
options && options.length > 0 ? option.flag ? option.flag.startsWith("http") ? /* @__PURE__ */ jsx("img", { alt: option.label, src: option.flag, height: 20, width: 20, style: { objectFit: "contain" } }) : /* @__PURE__ */ jsx(Icon, { icon: option.flag, width: 20, height: 20 }) : null : option.flag ? /* @__PURE__ */ jsx(Icon, { icon: option.flag, width: 20, height: 20 }) : null,
|
|
2823
3070
|
/* @__PURE__ */ jsx("span", { children: option.label })
|
|
2824
3071
|
]
|
|
2825
3072
|
}
|
|
@@ -2841,7 +3088,7 @@ var InputDynamic = ({
|
|
|
2841
3088
|
return /* @__PURE__ */ jsx(
|
|
2842
3089
|
"div",
|
|
2843
3090
|
{
|
|
2844
|
-
className:
|
|
3091
|
+
className: mergeClasses(styles.phoneInputWrapper, phoneAppearanceClass, error ? styles.phoneInputError : ""),
|
|
2845
3092
|
children: /* @__PURE__ */ jsx(
|
|
2846
3093
|
PhoneInput,
|
|
2847
3094
|
{
|
|
@@ -2855,9 +3102,7 @@ var InputDynamic = ({
|
|
|
2855
3102
|
disabled,
|
|
2856
3103
|
enableSearch: true,
|
|
2857
3104
|
disableSearchIcon: true,
|
|
2858
|
-
inputStyle:
|
|
2859
|
-
fontSize: fontSizeValuePhoneInput
|
|
2860
|
-
}
|
|
3105
|
+
inputStyle: phoneInputSizeStyle
|
|
2861
3106
|
}
|
|
2862
3107
|
)
|
|
2863
3108
|
}
|
|
@@ -4061,9 +4306,10 @@ var useStyles9 = makeStyles({
|
|
|
4061
4306
|
},
|
|
4062
4307
|
circular: {
|
|
4063
4308
|
position: "absolute",
|
|
4064
|
-
width: "clamp(
|
|
4065
|
-
height: "clamp(
|
|
4066
|
-
|
|
4309
|
+
width: "clamp(45px, 8vw, 90px)",
|
|
4310
|
+
height: "clamp(22.5px, 4vw, 45px)",
|
|
4311
|
+
// lebih kecil dari width
|
|
4312
|
+
borderRadius: "50% 50% 0 0 / 100% 100% 0 0",
|
|
4067
4313
|
backgroundColor: tokens.colorNeutralBackground1Hover,
|
|
4068
4314
|
bottom: "-10px",
|
|
4069
4315
|
boxShadow: "inset 0 2px 0px rgba(0, 0, 0, 0.1)"
|
|
@@ -4087,23 +4333,27 @@ var CardTicketSearchSummary = ({
|
|
|
4087
4333
|
const { width } = useWindowSize();
|
|
4088
4334
|
const getCircularConfig = () => {
|
|
4089
4335
|
if (width <= parseInt(extendedTokens.breakpointXs))
|
|
4090
|
-
return { count: 4, spacing: 65
|
|
4336
|
+
return { count: 4, spacing: 65 };
|
|
4091
4337
|
if (width <= parseInt(extendedTokens.breakpointSm))
|
|
4092
|
-
return { count: 5, spacing: 71
|
|
4338
|
+
return { count: 5, spacing: 71 };
|
|
4093
4339
|
if (width <= parseInt(extendedTokens.breakpointMd))
|
|
4094
|
-
return { count: 8, spacing: 87
|
|
4340
|
+
return { count: 8, spacing: 87 };
|
|
4095
4341
|
if (width <= parseInt(extendedTokens.breakpointLg))
|
|
4096
|
-
return { count: 9, spacing: 100
|
|
4342
|
+
return { count: 9, spacing: 100 };
|
|
4097
4343
|
if (width <= parseInt(extendedTokens.breakpointXl))
|
|
4098
|
-
return { count: 8, spacing: 115
|
|
4344
|
+
return { count: 8, spacing: 115 };
|
|
4099
4345
|
if (width <= parseInt(extendedTokens.breakpointXxl))
|
|
4100
|
-
return { count: 8, spacing:
|
|
4346
|
+
return { count: 8, spacing: 125 };
|
|
4101
4347
|
if (width <= parseInt(extendedTokens.breakpointXxxl))
|
|
4102
|
-
return { count:
|
|
4103
|
-
return { count:
|
|
4348
|
+
return { count: 9, spacing: 120 };
|
|
4349
|
+
return { count: 13, spacing: 114 };
|
|
4104
4350
|
};
|
|
4105
4351
|
const circularConfig = getCircularConfig();
|
|
4106
|
-
const RenderField = ({
|
|
4352
|
+
const RenderField = ({
|
|
4353
|
+
label,
|
|
4354
|
+
value,
|
|
4355
|
+
icon
|
|
4356
|
+
}) => {
|
|
4107
4357
|
return /* @__PURE__ */ jsxs(
|
|
4108
4358
|
"div",
|
|
4109
4359
|
{
|
|
@@ -4131,12 +4381,18 @@ var CardTicketSearchSummary = ({
|
|
|
4131
4381
|
style: { height: "20px", width: "20px" }
|
|
4132
4382
|
}
|
|
4133
4383
|
),
|
|
4134
|
-
/* @__PURE__ */ jsx(
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4384
|
+
/* @__PURE__ */ jsx(
|
|
4385
|
+
Body1Strong,
|
|
4386
|
+
{
|
|
4387
|
+
style: {
|
|
4388
|
+
display: "-webkit-box",
|
|
4389
|
+
WebkitLineClamp: 1,
|
|
4390
|
+
WebkitBoxOrient: "vertical",
|
|
4391
|
+
overflow: "hidden"
|
|
4392
|
+
},
|
|
4393
|
+
children: value
|
|
4394
|
+
}
|
|
4395
|
+
)
|
|
4140
4396
|
]
|
|
4141
4397
|
}
|
|
4142
4398
|
)
|
|
@@ -4531,7 +4787,8 @@ var ModalSearchHarbor = ({
|
|
|
4531
4787
|
onAddLastSearched,
|
|
4532
4788
|
onRemoveLastSearched,
|
|
4533
4789
|
onClearLastSearched,
|
|
4534
|
-
popularHarbors
|
|
4790
|
+
popularHarbors,
|
|
4791
|
+
showButtonFavorite = true
|
|
4535
4792
|
}) => {
|
|
4536
4793
|
const styles = useStyles10();
|
|
4537
4794
|
const mergedLabels = { ...DEFAULT_LABELS10[language], ...labels };
|
|
@@ -4685,7 +4942,7 @@ var ModalSearchHarbor = ({
|
|
|
4685
4942
|
]
|
|
4686
4943
|
}
|
|
4687
4944
|
),
|
|
4688
|
-
/* @__PURE__ */ jsx(
|
|
4945
|
+
showButtonFavorite && /* @__PURE__ */ jsx(
|
|
4689
4946
|
Icon,
|
|
4690
4947
|
{
|
|
4691
4948
|
icon: harbor.isFavorite ? "fluent:star-24-filled" : "fluent:star-24-regular",
|
|
@@ -5437,7 +5694,7 @@ var ModalTotalPassengers = ({
|
|
|
5437
5694
|
const parts = [];
|
|
5438
5695
|
passenger.classes.forEach((cls) => {
|
|
5439
5696
|
if ((cls.count ?? 0) > 0) {
|
|
5440
|
-
const displayName = cls.
|
|
5697
|
+
const displayName = cls.className?.toUpperCase();
|
|
5441
5698
|
parts.push(`${cls.count} ${displayName}`);
|
|
5442
5699
|
}
|
|
5443
5700
|
});
|
|
@@ -5561,7 +5818,7 @@ var ModalTotalPassengers = ({
|
|
|
5561
5818
|
{
|
|
5562
5819
|
className: styles.nestedRow,
|
|
5563
5820
|
children: [
|
|
5564
|
-
/* @__PURE__ */ jsx(Body1, { children: cls
|
|
5821
|
+
/* @__PURE__ */ jsx(Body1, { children: (cls?.className || "")?.toUpperCase() }),
|
|
5565
5822
|
/* @__PURE__ */ jsxs("div", { className: styles.passengerCount, children: [
|
|
5566
5823
|
/* @__PURE__ */ jsx(
|
|
5567
5824
|
Button,
|
|
@@ -7649,7 +7906,7 @@ var CardOrdererInfo = ({
|
|
|
7649
7906
|
var DEFAULT_LABELS21 = {
|
|
7650
7907
|
id: {
|
|
7651
7908
|
title: "Detail Penumpang",
|
|
7652
|
-
sameAsOrderer:
|
|
7909
|
+
// sameAsOrderer: 'Sama Dengan Pemesan',
|
|
7653
7910
|
searchPlaceholder: "Cari Penumpang",
|
|
7654
7911
|
addPassengerButton: "Tambah Penumpang",
|
|
7655
7912
|
cancelButton: "Batal",
|
|
@@ -7663,7 +7920,7 @@ var DEFAULT_LABELS21 = {
|
|
|
7663
7920
|
},
|
|
7664
7921
|
en: {
|
|
7665
7922
|
title: "Passenger Details",
|
|
7666
|
-
sameAsOrderer:
|
|
7923
|
+
// sameAsOrderer: 'Same as Orderer',
|
|
7667
7924
|
searchPlaceholder: "Search Passenger",
|
|
7668
7925
|
addPassengerButton: "Add Passenger",
|
|
7669
7926
|
cancelButton: "Cancel",
|
|
@@ -7727,9 +7984,9 @@ var ModalListPassenger = ({
|
|
|
7727
7984
|
onSearchChange,
|
|
7728
7985
|
onSelectPassenger,
|
|
7729
7986
|
onEditPassenger,
|
|
7730
|
-
onAddPassenger
|
|
7731
|
-
sameAsOrderer,
|
|
7732
|
-
onSameAsOrdererChange
|
|
7987
|
+
onAddPassenger
|
|
7988
|
+
// sameAsOrderer,
|
|
7989
|
+
// onSameAsOrdererChange,
|
|
7733
7990
|
}) => {
|
|
7734
7991
|
const styles = useStyles21();
|
|
7735
7992
|
const mergedLabels = { ...DEFAULT_LABELS21[language], ...labels };
|
|
@@ -7745,7 +8002,7 @@ var ModalListPassenger = ({
|
|
|
7745
8002
|
const filteredPassengers = passengers.filter((passenger) => {
|
|
7746
8003
|
if (!searchQuery) return true;
|
|
7747
8004
|
const query = searchQuery.toLowerCase();
|
|
7748
|
-
return passenger.
|
|
8005
|
+
return passenger.fullName && passenger.fullName.toLowerCase().includes(query) || passenger.ageLabel && passenger.ageLabel.toLowerCase().includes(query);
|
|
7749
8006
|
});
|
|
7750
8007
|
return /* @__PURE__ */ jsx(
|
|
7751
8008
|
Dialog,
|
|
@@ -7760,14 +8017,6 @@ var ModalListPassenger = ({
|
|
|
7760
8017
|
/* @__PURE__ */ jsx(
|
|
7761
8018
|
DialogTitle,
|
|
7762
8019
|
{
|
|
7763
|
-
action: /* @__PURE__ */ jsx(
|
|
7764
|
-
Switch,
|
|
7765
|
-
{
|
|
7766
|
-
label: mergedLabels.sameAsOrderer,
|
|
7767
|
-
checked: sameAsOrderer,
|
|
7768
|
-
onChange: (_, data) => onSameAsOrdererChange(data.checked)
|
|
7769
|
-
}
|
|
7770
|
-
),
|
|
7771
8020
|
children: /* @__PURE__ */ jsx(Subtitle1, { children: displayTitle })
|
|
7772
8021
|
}
|
|
7773
8022
|
),
|
|
@@ -7798,21 +8047,10 @@ var ModalListPassenger = ({
|
|
|
7798
8047
|
},
|
|
7799
8048
|
children: [
|
|
7800
8049
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Subtitle2, { children: [
|
|
7801
|
-
passenger.
|
|
8050
|
+
passenger.fullName,
|
|
7802
8051
|
" (",
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
if (cat === "ADULT")
|
|
7806
|
-
return mergedLabels.categories.adult;
|
|
7807
|
-
if (cat === "CHILD")
|
|
7808
|
-
return mergedLabels.categories.child;
|
|
7809
|
-
if (cat === "INFANT")
|
|
7810
|
-
return mergedLabels.categories.infant;
|
|
7811
|
-
if (cat === "ELDERLY")
|
|
7812
|
-
return mergedLabels.categories.elderly;
|
|
7813
|
-
return passenger.category;
|
|
7814
|
-
})(),
|
|
7815
|
-
")"
|
|
8052
|
+
passenger.ageLabel,
|
|
8053
|
+
" )"
|
|
7816
8054
|
] }) }),
|
|
7817
8055
|
/* @__PURE__ */ jsx(
|
|
7818
8056
|
Button,
|
|
@@ -7885,6 +8123,10 @@ var DEFAULT_LABELS22 = {
|
|
|
7885
8123
|
countryLabel: "Negara Penerbit Passport",
|
|
7886
8124
|
countryPlaceholder: "Masukkan Negara",
|
|
7887
8125
|
autofill: "Isi Data Otomatis",
|
|
8126
|
+
phoneNumberLabel: "Nomor Telepon",
|
|
8127
|
+
phoneNumberPlaceholder: "Masukkan Nomor Telepon",
|
|
8128
|
+
emailLabel: "Email",
|
|
8129
|
+
emailPlaceholder: "Masukkan Email",
|
|
7888
8130
|
// Scan Identity
|
|
7889
8131
|
selectIdTypeTitle: "Isi Data Dengan Scan Identitas",
|
|
7890
8132
|
scanIdentityTitle: "Scan Identitas",
|
|
@@ -7914,7 +8156,10 @@ var DEFAULT_LABELS22 = {
|
|
|
7914
8156
|
maxAge: "Usia maksimal 150 tahun",
|
|
7915
8157
|
requiredDate: "Tanggal lahir harus diisi",
|
|
7916
8158
|
requiredCity: "Kota/Kabupaten harus diisi",
|
|
7917
|
-
requiredCountry: "Negara harus diisi"
|
|
8159
|
+
requiredCountry: "Negara harus diisi",
|
|
8160
|
+
requiredPhoneNumber: "Nomor telepon harus diisi",
|
|
8161
|
+
minLengthPhoneNumber: "Nomor telepon minimal 10 karakter",
|
|
8162
|
+
invalidEmail: "Format email tidak valid"
|
|
7918
8163
|
}
|
|
7919
8164
|
},
|
|
7920
8165
|
en: {
|
|
@@ -7941,6 +8186,10 @@ var DEFAULT_LABELS22 = {
|
|
|
7941
8186
|
countryLabel: "Country of Issue",
|
|
7942
8187
|
countryPlaceholder: "Enter Country",
|
|
7943
8188
|
autofill: "Autofill",
|
|
8189
|
+
phoneNumberLabel: "Phone Number",
|
|
8190
|
+
phoneNumberPlaceholder: "Enter Phone Number",
|
|
8191
|
+
emailLabel: "Email",
|
|
8192
|
+
emailPlaceholder: "Enter Email",
|
|
7944
8193
|
// Scan Identity
|
|
7945
8194
|
selectIdTypeTitle: "Fill Data by Scanning Identity",
|
|
7946
8195
|
scanIdentityTitle: "Scan Identity",
|
|
@@ -7970,7 +8219,10 @@ var DEFAULT_LABELS22 = {
|
|
|
7970
8219
|
maxAge: "Age must be at most 150 years",
|
|
7971
8220
|
requiredDate: "Date of birth is required",
|
|
7972
8221
|
requiredCity: "City/Regency is required",
|
|
7973
|
-
requiredCountry: "Country is required"
|
|
8222
|
+
requiredCountry: "Country is required",
|
|
8223
|
+
requiredPhoneNumber: "Phone number is required",
|
|
8224
|
+
minLengthPhoneNumber: "Phone number must be at least 10 characters",
|
|
8225
|
+
invalidEmail: "Invalid email format"
|
|
7974
8226
|
}
|
|
7975
8227
|
}
|
|
7976
8228
|
};
|
|
@@ -8279,7 +8531,9 @@ var ModalPassengerForm = ({
|
|
|
8279
8531
|
const performOCR = async () => {
|
|
8280
8532
|
try {
|
|
8281
8533
|
const Tesseract = await import('tesseract.js');
|
|
8282
|
-
const {
|
|
8534
|
+
const {
|
|
8535
|
+
data: { text }
|
|
8536
|
+
} = await Tesseract.recognize(capturedImage, "ind");
|
|
8283
8537
|
if (isCancelled) return;
|
|
8284
8538
|
setScanStep(1);
|
|
8285
8539
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
@@ -8331,7 +8585,14 @@ var ModalPassengerForm = ({
|
|
|
8331
8585
|
return () => {
|
|
8332
8586
|
isCancelled = true;
|
|
8333
8587
|
};
|
|
8334
|
-
}, [
|
|
8588
|
+
}, [
|
|
8589
|
+
scanStatus,
|
|
8590
|
+
capturedImage,
|
|
8591
|
+
stopCamera,
|
|
8592
|
+
setValue,
|
|
8593
|
+
scannedIdType,
|
|
8594
|
+
onScanComplete
|
|
8595
|
+
]);
|
|
8335
8596
|
const handleFormSubmit = (data) => {
|
|
8336
8597
|
onSubmit(data);
|
|
8337
8598
|
reset();
|
|
@@ -9123,6 +9384,7 @@ var CardVehicleDetail = ({
|
|
|
9123
9384
|
serviceTitle,
|
|
9124
9385
|
serviceImage,
|
|
9125
9386
|
control,
|
|
9387
|
+
disabled,
|
|
9126
9388
|
vehicleNumberName = "vehicleNumber",
|
|
9127
9389
|
showLoadOption = false,
|
|
9128
9390
|
hasLoad,
|
|
@@ -9166,6 +9428,7 @@ var CardVehicleDetail = ({
|
|
|
9166
9428
|
InputDynamic_default,
|
|
9167
9429
|
{
|
|
9168
9430
|
control,
|
|
9431
|
+
disabled,
|
|
9169
9432
|
name: vehicleNumberName,
|
|
9170
9433
|
placeholder: mergedLabels.vehicleNumberPlaceholder,
|
|
9171
9434
|
type: "text"
|
|
@@ -9177,6 +9440,7 @@ var CardVehicleDetail = ({
|
|
|
9177
9440
|
/* @__PURE__ */ jsxs(
|
|
9178
9441
|
RadioGroup,
|
|
9179
9442
|
{
|
|
9443
|
+
disabled,
|
|
9180
9444
|
value: hasLoad,
|
|
9181
9445
|
onChange: (_, data) => onHasLoadChange?.(data.value),
|
|
9182
9446
|
layout: "horizontal",
|
|
@@ -9344,6 +9608,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9344
9608
|
owners,
|
|
9345
9609
|
hasLoad,
|
|
9346
9610
|
control,
|
|
9611
|
+
disabled,
|
|
9347
9612
|
watch,
|
|
9348
9613
|
setValue,
|
|
9349
9614
|
getValues,
|
|
@@ -9353,8 +9618,16 @@ var CardVehicleOwnerForm = ({
|
|
|
9353
9618
|
onAddCargo,
|
|
9354
9619
|
onDeleteCargo,
|
|
9355
9620
|
onUpdateCargoQuantity,
|
|
9356
|
-
|
|
9357
|
-
|
|
9621
|
+
companySenderOptions = [],
|
|
9622
|
+
companyOwnerOptions = [],
|
|
9623
|
+
companyLogisticsOptions = [],
|
|
9624
|
+
companyReceiverOptions = [],
|
|
9625
|
+
cityOriginOptions = [],
|
|
9626
|
+
cityDestinationOptions = [],
|
|
9627
|
+
commodityOptions = [],
|
|
9628
|
+
loadTypeOptions = [],
|
|
9629
|
+
industryOptions = [],
|
|
9630
|
+
loadCategoryOptions = [],
|
|
9358
9631
|
language = "id",
|
|
9359
9632
|
labels
|
|
9360
9633
|
}) => {
|
|
@@ -9412,8 +9685,9 @@ var CardVehicleOwnerForm = ({
|
|
|
9412
9685
|
Button,
|
|
9413
9686
|
{
|
|
9414
9687
|
appearance: "transparent",
|
|
9415
|
-
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
9416
9688
|
"aria-label": mergedLabels.deleteOwnerAriaLabel,
|
|
9689
|
+
disabled,
|
|
9690
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
9417
9691
|
onClick: (e) => {
|
|
9418
9692
|
e.stopPropagation();
|
|
9419
9693
|
onDeleteOwner(owner.id);
|
|
@@ -9441,6 +9715,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9441
9715
|
children: /* @__PURE__ */ jsxs(
|
|
9442
9716
|
RadioGroup,
|
|
9443
9717
|
{
|
|
9718
|
+
disabled,
|
|
9444
9719
|
layout: "horizontal",
|
|
9445
9720
|
value: owner.senderType,
|
|
9446
9721
|
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
@@ -9470,11 +9745,12 @@ var CardVehicleOwnerForm = ({
|
|
|
9470
9745
|
InputDynamic_default,
|
|
9471
9746
|
{
|
|
9472
9747
|
control,
|
|
9748
|
+
disabled,
|
|
9473
9749
|
name: `owners.${index}.senderName`,
|
|
9474
9750
|
placeholder: owner.senderType === "Perusahaan" ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
9475
9751
|
size: "large",
|
|
9476
9752
|
type: owner.senderType === "Perusahaan" ? "select" : "text",
|
|
9477
|
-
options: owner.senderType === "Perusahaan" ?
|
|
9753
|
+
options: owner.senderType === "Perusahaan" ? companySenderOptions : []
|
|
9478
9754
|
}
|
|
9479
9755
|
)
|
|
9480
9756
|
] }),
|
|
@@ -9489,6 +9765,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9489
9765
|
InputDynamic_default,
|
|
9490
9766
|
{
|
|
9491
9767
|
control,
|
|
9768
|
+
disabled,
|
|
9492
9769
|
name: `owners.${index}.estimatedWeight`,
|
|
9493
9770
|
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
9494
9771
|
size: "large",
|
|
@@ -9504,10 +9781,11 @@ var CardVehicleOwnerForm = ({
|
|
|
9504
9781
|
InputDynamic_default,
|
|
9505
9782
|
{
|
|
9506
9783
|
control,
|
|
9784
|
+
disabled,
|
|
9507
9785
|
name: `looseCargoOwners.${index}.originCity`,
|
|
9508
9786
|
placeholder: mergedLabels.selectPlaceholder,
|
|
9509
9787
|
type: "select",
|
|
9510
|
-
options:
|
|
9788
|
+
options: cityOriginOptions,
|
|
9511
9789
|
size: "large"
|
|
9512
9790
|
}
|
|
9513
9791
|
)
|
|
@@ -9518,10 +9796,11 @@ var CardVehicleOwnerForm = ({
|
|
|
9518
9796
|
InputDynamic_default,
|
|
9519
9797
|
{
|
|
9520
9798
|
control,
|
|
9799
|
+
disabled,
|
|
9521
9800
|
name: `looseCargoOwners.${index}.destinationCity`,
|
|
9522
9801
|
placeholder: mergedLabels.selectPlaceholder,
|
|
9523
9802
|
type: "select",
|
|
9524
|
-
options:
|
|
9803
|
+
options: cityDestinationOptions,
|
|
9525
9804
|
size: "large"
|
|
9526
9805
|
}
|
|
9527
9806
|
)
|
|
@@ -9546,6 +9825,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9546
9825
|
children: /* @__PURE__ */ jsxs(
|
|
9547
9826
|
RadioGroup,
|
|
9548
9827
|
{
|
|
9828
|
+
disabled,
|
|
9549
9829
|
layout: "horizontal",
|
|
9550
9830
|
value: owner.cargoOwnerType || "Perusahaan",
|
|
9551
9831
|
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
@@ -9574,12 +9854,13 @@ var CardVehicleOwnerForm = ({
|
|
|
9574
9854
|
/* @__PURE__ */ jsx(
|
|
9575
9855
|
InputDynamic_default,
|
|
9576
9856
|
{
|
|
9857
|
+
disabled,
|
|
9577
9858
|
control,
|
|
9578
9859
|
name: `looseCargoOwners.${index}.cargoOwnerName`,
|
|
9579
9860
|
placeholder: owner.cargoOwnerType === "Perusahaan" ? mergedLabels.cargoOwnerCompanyPlaceholder : mergedLabels.cargoOwnerIndividualPlaceholder,
|
|
9580
9861
|
size: "large",
|
|
9581
9862
|
type: owner.cargoOwnerType === "Perusahaan" ? "select" : "text",
|
|
9582
|
-
options: owner.cargoOwnerType === "Perusahaan" ?
|
|
9863
|
+
options: owner.cargoOwnerType === "Perusahaan" ? companyOwnerOptions : []
|
|
9583
9864
|
}
|
|
9584
9865
|
),
|
|
9585
9866
|
/* @__PURE__ */ jsx(
|
|
@@ -9610,6 +9891,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9610
9891
|
children: /* @__PURE__ */ jsxs(
|
|
9611
9892
|
RadioGroup,
|
|
9612
9893
|
{
|
|
9894
|
+
disabled,
|
|
9613
9895
|
layout: "horizontal",
|
|
9614
9896
|
value: owner.logisticsCompanyType || "Perseorangan",
|
|
9615
9897
|
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
@@ -9639,11 +9921,12 @@ var CardVehicleOwnerForm = ({
|
|
|
9639
9921
|
InputDynamic_default,
|
|
9640
9922
|
{
|
|
9641
9923
|
control,
|
|
9924
|
+
disabled,
|
|
9642
9925
|
name: `looseCargoOwners.${index}.logisticsCompanyName`,
|
|
9643
9926
|
placeholder: owner.logisticsCompanyType === "Perusahaan" ? mergedLabels.logisticsCompanyPlaceholder : mergedLabels.logisticsIndividualPlaceholder,
|
|
9644
9927
|
size: "large",
|
|
9645
9928
|
type: owner.logisticsCompanyType === "Perusahaan" ? "select" : "text",
|
|
9646
|
-
options: owner.logisticsCompanyType === "Perusahaan" ?
|
|
9929
|
+
options: owner.logisticsCompanyType === "Perusahaan" ? companyLogisticsOptions : []
|
|
9647
9930
|
}
|
|
9648
9931
|
),
|
|
9649
9932
|
/* @__PURE__ */ jsx(
|
|
@@ -9664,6 +9947,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9664
9947
|
/* @__PURE__ */ jsxs(
|
|
9665
9948
|
RadioGroup,
|
|
9666
9949
|
{
|
|
9950
|
+
disabled,
|
|
9667
9951
|
layout: "horizontal",
|
|
9668
9952
|
value: owner.cargoReceiverType || "Perusahaan",
|
|
9669
9953
|
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
@@ -9691,11 +9975,12 @@ var CardVehicleOwnerForm = ({
|
|
|
9691
9975
|
InputDynamic_default,
|
|
9692
9976
|
{
|
|
9693
9977
|
control,
|
|
9978
|
+
disabled,
|
|
9694
9979
|
name: `looseCargoOwners.${index}.cargoReceiverName`,
|
|
9695
9980
|
placeholder: owner.cargoReceiverType === "Perusahaan" ? mergedLabels.cargoReceiverCompanyPlaceholder : mergedLabels.cargoReceiverIndividualPlaceholder,
|
|
9696
9981
|
size: "large",
|
|
9697
9982
|
type: owner.cargoReceiverType === "Perusahaan" ? "select" : "text",
|
|
9698
|
-
options: owner.cargoReceiverType === "Perusahaan" ?
|
|
9983
|
+
options: owner.cargoReceiverType === "Perusahaan" ? companyReceiverOptions : []
|
|
9699
9984
|
}
|
|
9700
9985
|
),
|
|
9701
9986
|
/* @__PURE__ */ jsx(
|
|
@@ -9720,6 +10005,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9720
10005
|
InputDynamic_default,
|
|
9721
10006
|
{
|
|
9722
10007
|
control,
|
|
10008
|
+
disabled,
|
|
9723
10009
|
name: `looseCargoOwners.${index}.cargoWeight`,
|
|
9724
10010
|
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
9725
10011
|
type: "number",
|
|
@@ -9778,10 +10064,11 @@ var CardVehicleOwnerForm = ({
|
|
|
9778
10064
|
InputDynamic_default,
|
|
9779
10065
|
{
|
|
9780
10066
|
control,
|
|
10067
|
+
disabled,
|
|
9781
10068
|
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.commodity`,
|
|
9782
10069
|
placeholder: mergedLabels.selectPlaceholder,
|
|
9783
10070
|
type: "select",
|
|
9784
|
-
options:
|
|
10071
|
+
options: commodityOptions,
|
|
9785
10072
|
size: "large"
|
|
9786
10073
|
}
|
|
9787
10074
|
),
|
|
@@ -9810,27 +10097,11 @@ var CardVehicleOwnerForm = ({
|
|
|
9810
10097
|
InputDynamic_default,
|
|
9811
10098
|
{
|
|
9812
10099
|
control,
|
|
10100
|
+
disabled,
|
|
9813
10101
|
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`,
|
|
9814
10102
|
placeholder: mergedLabels.selectPlaceholder,
|
|
9815
10103
|
type: "select",
|
|
9816
|
-
options:
|
|
9817
|
-
{
|
|
9818
|
-
value: "karung",
|
|
9819
|
-
label: mergedLabels.cargoTypeOptions.karung
|
|
9820
|
-
},
|
|
9821
|
-
{
|
|
9822
|
-
value: "kg",
|
|
9823
|
-
label: mergedLabels.cargoTypeOptions.kg
|
|
9824
|
-
},
|
|
9825
|
-
{
|
|
9826
|
-
value: "ton",
|
|
9827
|
-
label: mergedLabels.cargoTypeOptions.ton
|
|
9828
|
-
},
|
|
9829
|
-
{
|
|
9830
|
-
value: "unit",
|
|
9831
|
-
label: mergedLabels.cargoTypeOptions.unit
|
|
9832
|
-
}
|
|
9833
|
-
],
|
|
10104
|
+
options: loadTypeOptions,
|
|
9834
10105
|
size: "large"
|
|
9835
10106
|
}
|
|
9836
10107
|
),
|
|
@@ -9874,6 +10145,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9874
10145
|
Button,
|
|
9875
10146
|
{
|
|
9876
10147
|
appearance: "transparent",
|
|
10148
|
+
disabled,
|
|
9877
10149
|
icon: /* @__PURE__ */ jsx(
|
|
9878
10150
|
Icon,
|
|
9879
10151
|
{
|
|
@@ -9915,6 +10187,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9915
10187
|
{
|
|
9916
10188
|
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
9917
10189
|
control,
|
|
10190
|
+
disabled,
|
|
9918
10191
|
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
9919
10192
|
"input",
|
|
9920
10193
|
{
|
|
@@ -9939,6 +10212,7 @@ var CardVehicleOwnerForm = ({
|
|
|
9939
10212
|
Button,
|
|
9940
10213
|
{
|
|
9941
10214
|
appearance: "transparent",
|
|
10215
|
+
disabled,
|
|
9942
10216
|
icon: /* @__PURE__ */ jsx(
|
|
9943
10217
|
Icon,
|
|
9944
10218
|
{
|
|
@@ -10012,9 +10286,9 @@ var CardVehicleOwnerForm = ({
|
|
|
10012
10286
|
InputDynamic_default,
|
|
10013
10287
|
{
|
|
10014
10288
|
control,
|
|
10289
|
+
disabled: true,
|
|
10015
10290
|
name: `owners.${index}.price`,
|
|
10016
10291
|
placeholder: mergedLabels.pricePlaceholder,
|
|
10017
|
-
disabled: true,
|
|
10018
10292
|
size: "large",
|
|
10019
10293
|
type: "text"
|
|
10020
10294
|
}
|
|
@@ -10032,10 +10306,11 @@ var CardVehicleOwnerForm = ({
|
|
|
10032
10306
|
InputDynamic_default,
|
|
10033
10307
|
{
|
|
10034
10308
|
control,
|
|
10309
|
+
disabled,
|
|
10035
10310
|
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.industryType`,
|
|
10036
10311
|
placeholder: mergedLabels.selectPlaceholder,
|
|
10037
10312
|
type: "select",
|
|
10038
|
-
options:
|
|
10313
|
+
options: industryOptions,
|
|
10039
10314
|
size: "large"
|
|
10040
10315
|
}
|
|
10041
10316
|
),
|
|
@@ -10060,10 +10335,11 @@ var CardVehicleOwnerForm = ({
|
|
|
10060
10335
|
InputDynamic_default,
|
|
10061
10336
|
{
|
|
10062
10337
|
control,
|
|
10338
|
+
disabled,
|
|
10063
10339
|
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoCategory`,
|
|
10064
10340
|
placeholder: mergedLabels.selectPlaceholder,
|
|
10065
10341
|
type: "select",
|
|
10066
|
-
options:
|
|
10342
|
+
options: loadCategoryOptions,
|
|
10067
10343
|
size: "large"
|
|
10068
10344
|
}
|
|
10069
10345
|
),
|
|
@@ -10086,6 +10362,7 @@ var CardVehicleOwnerForm = ({
|
|
|
10086
10362
|
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsx(
|
|
10087
10363
|
Button,
|
|
10088
10364
|
{
|
|
10365
|
+
disabled,
|
|
10089
10366
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
10090
10367
|
onClick: (e) => {
|
|
10091
10368
|
e.stopPropagation();
|
|
@@ -10283,16 +10560,17 @@ var useStyles26 = makeStyles({
|
|
|
10283
10560
|
var CardBookingTicket = ({
|
|
10284
10561
|
language = "id",
|
|
10285
10562
|
labels,
|
|
10286
|
-
|
|
10287
|
-
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10563
|
+
providerLogo,
|
|
10564
|
+
shipName,
|
|
10565
|
+
shipType,
|
|
10566
|
+
shipTypeColor,
|
|
10567
|
+
departureDay,
|
|
10568
|
+
departureTime,
|
|
10569
|
+
departureLocation,
|
|
10570
|
+
arrivalDay,
|
|
10571
|
+
arrivalTime,
|
|
10572
|
+
arrivalLocation,
|
|
10573
|
+
duration = 0,
|
|
10296
10574
|
totalPrice,
|
|
10297
10575
|
reservationStep,
|
|
10298
10576
|
paymentStep,
|
|
@@ -10311,7 +10589,7 @@ var CardBookingTicket = ({
|
|
|
10311
10589
|
/* @__PURE__ */ jsx(
|
|
10312
10590
|
"img",
|
|
10313
10591
|
{
|
|
10314
|
-
src: "/assets/logo/asdp-default.svg",
|
|
10592
|
+
src: providerLogo || "/assets/logo/asdp-default.svg",
|
|
10315
10593
|
width: 81,
|
|
10316
10594
|
height: 54,
|
|
10317
10595
|
alt: "asdp"
|
|
@@ -10324,7 +10602,7 @@ var CardBookingTicket = ({
|
|
|
10324
10602
|
{
|
|
10325
10603
|
size: "extra-large",
|
|
10326
10604
|
appearance: "filled",
|
|
10327
|
-
|
|
10605
|
+
style: { backgroundColor: shipTypeColor },
|
|
10328
10606
|
iconPosition: "before",
|
|
10329
10607
|
shape: "rounded",
|
|
10330
10608
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:info-24-regular" }),
|
|
@@ -10348,7 +10626,7 @@ var CardBookingTicket = ({
|
|
|
10348
10626
|
/* @__PURE__ */ jsxs(Caption2, { children: [
|
|
10349
10627
|
mergedLabels.estimationPrefix,
|
|
10350
10628
|
" ",
|
|
10351
|
-
duration
|
|
10629
|
+
formatDuration(duration)
|
|
10352
10630
|
] })
|
|
10353
10631
|
] }),
|
|
10354
10632
|
/* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
|
|
@@ -10962,13 +11240,15 @@ var DEFAULT_LABELS29 = {
|
|
|
10962
11240
|
addButton: "Tambah",
|
|
10963
11241
|
currencySymbol: "Rp",
|
|
10964
11242
|
decrementAriaLabel: "Kurangi jumlah",
|
|
10965
|
-
incrementAriaLabel: "Tambah jumlah"
|
|
11243
|
+
incrementAriaLabel: "Tambah jumlah",
|
|
11244
|
+
searchPlaceholder: "Cari makanan atau minuman yang Anda inginkan"
|
|
10966
11245
|
},
|
|
10967
11246
|
en: {
|
|
10968
11247
|
addButton: "Add",
|
|
10969
11248
|
currencySymbol: "Rp",
|
|
10970
11249
|
decrementAriaLabel: "Decrease quantity",
|
|
10971
|
-
incrementAriaLabel: "Increase quantity"
|
|
11250
|
+
incrementAriaLabel: "Increase quantity",
|
|
11251
|
+
searchPlaceholder: "Search for food or drinks you want"
|
|
10972
11252
|
}
|
|
10973
11253
|
};
|
|
10974
11254
|
var useStyles29 = makeStyles({
|
|
@@ -11098,6 +11378,9 @@ var useStyles29 = makeStyles({
|
|
|
11098
11378
|
// tokensV2.lightModeColors.Brand_Stroke_1_Rest
|
|
11099
11379
|
color: "rgb(30, 57, 141)"
|
|
11100
11380
|
// tokensV2.lightModeColors.Brand_Foreground_1_Rest
|
|
11381
|
+
},
|
|
11382
|
+
searchContainer: {
|
|
11383
|
+
width: "100%"
|
|
11101
11384
|
}
|
|
11102
11385
|
});
|
|
11103
11386
|
var CardMealCatalog = ({
|
|
@@ -11108,7 +11391,9 @@ var CardMealCatalog = ({
|
|
|
11108
11391
|
categories,
|
|
11109
11392
|
onAdd,
|
|
11110
11393
|
onUpdateQuantity,
|
|
11111
|
-
className
|
|
11394
|
+
className,
|
|
11395
|
+
searchValue,
|
|
11396
|
+
onSearchChange
|
|
11112
11397
|
}) => {
|
|
11113
11398
|
const styles = useStyles29();
|
|
11114
11399
|
const mergedLabels = { ...DEFAULT_LABELS29[language], ...labels };
|
|
@@ -11133,6 +11418,16 @@ var CardMealCatalog = ({
|
|
|
11133
11418
|
/* @__PURE__ */ jsx(InfoRegular, {}),
|
|
11134
11419
|
/* @__PURE__ */ jsx(Caption1, { children: disclaimerText })
|
|
11135
11420
|
] }),
|
|
11421
|
+
/* @__PURE__ */ jsx("div", { className: styles.searchContainer, children: /* @__PURE__ */ jsx(
|
|
11422
|
+
Input,
|
|
11423
|
+
{
|
|
11424
|
+
contentBefore: /* @__PURE__ */ jsx(SearchRegular, {}),
|
|
11425
|
+
placeholder: mergedLabels.searchPlaceholder,
|
|
11426
|
+
value: searchValue,
|
|
11427
|
+
onChange: (_, data) => onSearchChange?.(data.value),
|
|
11428
|
+
style: { width: "100%" }
|
|
11429
|
+
}
|
|
11430
|
+
) }),
|
|
11136
11431
|
categories.map((cat, index) => /* @__PURE__ */ jsxs("section", { children: [
|
|
11137
11432
|
/* @__PURE__ */ jsx(
|
|
11138
11433
|
Title3,
|
|
@@ -12532,6 +12827,59 @@ var DEFAULT_LABELS38 = {
|
|
|
12532
12827
|
requiredError: "is required"
|
|
12533
12828
|
}
|
|
12534
12829
|
};
|
|
12830
|
+
var useStyles39 = makeStyles({
|
|
12831
|
+
surface: {
|
|
12832
|
+
maxWidth: "90vw",
|
|
12833
|
+
maxHeight: "90vh",
|
|
12834
|
+
backgroundColor: "transparent",
|
|
12835
|
+
boxShadow: "none"
|
|
12836
|
+
},
|
|
12837
|
+
closeButton: {
|
|
12838
|
+
backgroundColor: tokens.colorNeutralForeground2,
|
|
12839
|
+
color: tokens.colorNeutralBackground1
|
|
12840
|
+
},
|
|
12841
|
+
content: {
|
|
12842
|
+
alignItems: "center",
|
|
12843
|
+
textAlign: "center"
|
|
12844
|
+
},
|
|
12845
|
+
image: {
|
|
12846
|
+
maxWidth: "100%",
|
|
12847
|
+
maxHeight: "70vh",
|
|
12848
|
+
objectFit: "contain"
|
|
12849
|
+
}
|
|
12850
|
+
});
|
|
12851
|
+
var ModalPreviewImage = ({
|
|
12852
|
+
open,
|
|
12853
|
+
onOpenChange,
|
|
12854
|
+
imageUrl,
|
|
12855
|
+
alt = "Preview"
|
|
12856
|
+
}) => {
|
|
12857
|
+
const styles = useStyles39();
|
|
12858
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (_, data) => onOpenChange(data.open), children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.surface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
12859
|
+
/* @__PURE__ */ jsx(
|
|
12860
|
+
DialogTitle,
|
|
12861
|
+
{
|
|
12862
|
+
action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
|
|
12863
|
+
Button,
|
|
12864
|
+
{
|
|
12865
|
+
appearance: "subtle",
|
|
12866
|
+
"aria-label": "close",
|
|
12867
|
+
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {}),
|
|
12868
|
+
className: styles.closeButton
|
|
12869
|
+
}
|
|
12870
|
+
) })
|
|
12871
|
+
}
|
|
12872
|
+
),
|
|
12873
|
+
/* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: imageUrl && /* @__PURE__ */ jsx(
|
|
12874
|
+
"img",
|
|
12875
|
+
{
|
|
12876
|
+
src: imageUrl,
|
|
12877
|
+
alt,
|
|
12878
|
+
className: styles.image
|
|
12879
|
+
}
|
|
12880
|
+
) })
|
|
12881
|
+
] }) }) });
|
|
12882
|
+
};
|
|
12535
12883
|
var uploadStyles = makeStyles({
|
|
12536
12884
|
container: {
|
|
12537
12885
|
backgroundColor: "#F0FEFF",
|
|
@@ -12805,56 +13153,7 @@ var FileUpload = React5.forwardRef(
|
|
|
12805
13153
|
] })
|
|
12806
13154
|
}
|
|
12807
13155
|
),
|
|
12808
|
-
/* @__PURE__ */ jsx(
|
|
12809
|
-
Dialog,
|
|
12810
|
-
{
|
|
12811
|
-
open: isPreviewOpen,
|
|
12812
|
-
onOpenChange: (_, data) => setIsPreviewOpen(data.open),
|
|
12813
|
-
children: /* @__PURE__ */ jsx(
|
|
12814
|
-
DialogSurface,
|
|
12815
|
-
{
|
|
12816
|
-
style: {
|
|
12817
|
-
maxWidth: "90vw",
|
|
12818
|
-
maxHeight: "90vh",
|
|
12819
|
-
backgroundColor: "transparent",
|
|
12820
|
-
boxShadow: "none"
|
|
12821
|
-
},
|
|
12822
|
-
children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
12823
|
-
/* @__PURE__ */ jsx(
|
|
12824
|
-
DialogTitle,
|
|
12825
|
-
{
|
|
12826
|
-
action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
|
|
12827
|
-
Button,
|
|
12828
|
-
{
|
|
12829
|
-
"aria-label": "close",
|
|
12830
|
-
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {}),
|
|
12831
|
-
style: {
|
|
12832
|
-
backgroundColor: tokens.colorNeutralForeground2,
|
|
12833
|
-
color: tokens.colorNeutralBackground1
|
|
12834
|
-
}
|
|
12835
|
-
}
|
|
12836
|
-
) })
|
|
12837
|
-
}
|
|
12838
|
-
),
|
|
12839
|
-
/* @__PURE__ */ jsx(
|
|
12840
|
-
DialogContent,
|
|
12841
|
-
{
|
|
12842
|
-
style: { alignItems: "center", textAlign: "center" },
|
|
12843
|
-
children: previewUrl && /* @__PURE__ */ jsx(
|
|
12844
|
-
"img",
|
|
12845
|
-
{
|
|
12846
|
-
src: previewUrl,
|
|
12847
|
-
alt: "Preview",
|
|
12848
|
-
className: styles.dialogImage
|
|
12849
|
-
}
|
|
12850
|
-
)
|
|
12851
|
-
}
|
|
12852
|
-
)
|
|
12853
|
-
] })
|
|
12854
|
-
}
|
|
12855
|
-
)
|
|
12856
|
-
}
|
|
12857
|
-
)
|
|
13156
|
+
/* @__PURE__ */ jsx(ModalPreviewImage, { imageUrl: previewUrl, open: isPreviewOpen, onOpenChange: setIsPreviewOpen })
|
|
12858
13157
|
]
|
|
12859
13158
|
}
|
|
12860
13159
|
);
|
|
@@ -13051,57 +13350,7 @@ var FileUpload = React5.forwardRef(
|
|
|
13051
13350
|
]
|
|
13052
13351
|
}
|
|
13053
13352
|
),
|
|
13054
|
-
/* @__PURE__ */ jsx(
|
|
13055
|
-
Dialog,
|
|
13056
|
-
{
|
|
13057
|
-
open: isPreviewOpen,
|
|
13058
|
-
onOpenChange: (_, data) => setIsPreviewOpen(data.open),
|
|
13059
|
-
children: /* @__PURE__ */ jsx(
|
|
13060
|
-
DialogSurface,
|
|
13061
|
-
{
|
|
13062
|
-
style: {
|
|
13063
|
-
maxWidth: "90vw",
|
|
13064
|
-
maxHeight: "90vh",
|
|
13065
|
-
backgroundColor: "transparent",
|
|
13066
|
-
boxShadow: "none"
|
|
13067
|
-
},
|
|
13068
|
-
children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
13069
|
-
/* @__PURE__ */ jsx(
|
|
13070
|
-
DialogTitle,
|
|
13071
|
-
{
|
|
13072
|
-
action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
|
|
13073
|
-
Button,
|
|
13074
|
-
{
|
|
13075
|
-
appearance: "subtle",
|
|
13076
|
-
"aria-label": "close",
|
|
13077
|
-
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {}),
|
|
13078
|
-
style: {
|
|
13079
|
-
backgroundColor: tokens.colorNeutralForeground2,
|
|
13080
|
-
color: tokens.colorNeutralBackground1
|
|
13081
|
-
}
|
|
13082
|
-
}
|
|
13083
|
-
) })
|
|
13084
|
-
}
|
|
13085
|
-
),
|
|
13086
|
-
/* @__PURE__ */ jsx(
|
|
13087
|
-
DialogContent,
|
|
13088
|
-
{
|
|
13089
|
-
style: { alignItems: "center", textAlign: "center" },
|
|
13090
|
-
children: previewUrl && /* @__PURE__ */ jsx(
|
|
13091
|
-
"img",
|
|
13092
|
-
{
|
|
13093
|
-
src: previewUrl,
|
|
13094
|
-
alt: "Preview",
|
|
13095
|
-
className: styles.dialogImage
|
|
13096
|
-
}
|
|
13097
|
-
)
|
|
13098
|
-
}
|
|
13099
|
-
)
|
|
13100
|
-
] })
|
|
13101
|
-
}
|
|
13102
|
-
)
|
|
13103
|
-
}
|
|
13104
|
-
)
|
|
13353
|
+
/* @__PURE__ */ jsx(ModalPreviewImage, { imageUrl: previewUrl, open: isPreviewOpen, onOpenChange: setIsPreviewOpen })
|
|
13105
13354
|
]
|
|
13106
13355
|
}
|
|
13107
13356
|
);
|
|
@@ -13118,7 +13367,7 @@ var DEFAULT_LABELS39 = {
|
|
|
13118
13367
|
id: {},
|
|
13119
13368
|
en: {}
|
|
13120
13369
|
};
|
|
13121
|
-
var
|
|
13370
|
+
var useStyles40 = makeStyles({
|
|
13122
13371
|
container: {
|
|
13123
13372
|
display: "flex",
|
|
13124
13373
|
flexDirection: "column",
|
|
@@ -13158,12 +13407,14 @@ var useStyles39 = makeStyles({
|
|
|
13158
13407
|
backgroundColor: tokens.colorBrandBackground2,
|
|
13159
13408
|
color: tokens.colorBrandForeground1
|
|
13160
13409
|
},
|
|
13161
|
-
justifyContent: "flex-start"
|
|
13410
|
+
justifyContent: "flex-start",
|
|
13411
|
+
textAlign: "left"
|
|
13162
13412
|
},
|
|
13163
13413
|
tabItemLogout: {
|
|
13164
13414
|
color: tokens.colorPaletteRedForeground1,
|
|
13165
13415
|
backgroundColor: "transparent",
|
|
13166
13416
|
justifyContent: "flex-start",
|
|
13417
|
+
textAlign: "left",
|
|
13167
13418
|
"&:hover": {
|
|
13168
13419
|
color: tokens.colorPaletteRedForeground1
|
|
13169
13420
|
}
|
|
@@ -13176,7 +13427,7 @@ var CardProfileMenu = ({
|
|
|
13176
13427
|
selectedValue,
|
|
13177
13428
|
onTabSelect
|
|
13178
13429
|
}) => {
|
|
13179
|
-
const styles =
|
|
13430
|
+
const styles = useStyles40();
|
|
13180
13431
|
({ ...DEFAULT_LABELS39[language], ...labels });
|
|
13181
13432
|
const handleTabSelect = (_, data) => {
|
|
13182
13433
|
onTabSelect(data.value);
|
|
@@ -13206,6 +13457,6 @@ var CardProfileMenu = ({
|
|
|
13206
13457
|
) });
|
|
13207
13458
|
};
|
|
13208
13459
|
|
|
13209
|
-
export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, COUNTRIES, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardProfileMenu, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS8 as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS9 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, CarouselWithCustomNav, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS17 as DateFilterDefaultLabels, FileUpload_default as FileUpload, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS16 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalListPassenger, ModalPassengerForm, ModalPriceDetail, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
|
|
13460
|
+
export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, COUNTRIES, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardProfileMenu, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS8 as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS9 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, CarouselWithCustomNav, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS17 as DateFilterDefaultLabels, FileUpload_default as FileUpload, GENDER, HTTP_STATUS, IDENTITY_TYPE, InputDynamic_default as InputDynamic, LOAD_TYPE, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS16 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalListPassenger, ModalPassengerForm, ModalPreviewImage, ModalPriceDetail, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, PASSENGER_TYPE, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
|
|
13210
13461
|
//# sourceMappingURL=index.mjs.map
|
|
13211
13462
|
//# sourceMappingURL=index.mjs.map
|