@asdp/ferryui 0.1.22-dev.10403 → 0.1.22-dev.10424
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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +82 -56
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -56
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13883,6 +13883,9 @@ var DEFAULT_LABELS27 = {
|
|
|
13883
13883
|
routeTitle: "Rute Perjalanan",
|
|
13884
13884
|
estimationPrefix: "Estimasi",
|
|
13885
13885
|
totalPriceLabel: "Total Harga",
|
|
13886
|
+
agreementPrefix: "Saya menyetujui",
|
|
13887
|
+
termsAndConditions: "Syarat & Ketentuan",
|
|
13888
|
+
agreementSuffix: "Ferizy",
|
|
13886
13889
|
nextButton: "Lanjutkan",
|
|
13887
13890
|
cancelButton: "Batalkan Pesanan",
|
|
13888
13891
|
previousButton: "Sebelumnya",
|
|
@@ -13893,13 +13896,17 @@ var DEFAULT_LABELS27 = {
|
|
|
13893
13896
|
cancelDialogTitle: "Buang perubahan?",
|
|
13894
13897
|
cancelDialogBody: "Perubahan belum disimpan dan akan hilang jika Anda melanjutkan.",
|
|
13895
13898
|
cancelDialogConfirm: "Buang Perubahan",
|
|
13896
|
-
cancelDialogDismiss: "Batal"
|
|
13899
|
+
cancelDialogDismiss: "Batal",
|
|
13900
|
+
nextPaymentButton: "Lanjut ke Pembayaran"
|
|
13897
13901
|
},
|
|
13898
13902
|
en: {
|
|
13899
13903
|
bookingDetails: "Booking Details",
|
|
13900
13904
|
routeTitle: "Travel Route",
|
|
13901
13905
|
estimationPrefix: "Estimation",
|
|
13902
13906
|
totalPriceLabel: "Total Price",
|
|
13907
|
+
agreementPrefix: "I agree to the",
|
|
13908
|
+
termsAndConditions: "Terms & Conditions",
|
|
13909
|
+
agreementSuffix: "Ferizy",
|
|
13903
13910
|
nextButton: "Continue",
|
|
13904
13911
|
cancelButton: "Cancel Booking",
|
|
13905
13912
|
previousButton: "Previous",
|
|
@@ -13910,7 +13917,8 @@ var DEFAULT_LABELS27 = {
|
|
|
13910
13917
|
cancelDialogTitle: "Discard changes?",
|
|
13911
13918
|
cancelDialogBody: "Changes have not been saved and will be lost if you continue.",
|
|
13912
13919
|
cancelDialogConfirm: "Discard Changes",
|
|
13913
|
-
cancelDialogDismiss: "Cancel"
|
|
13920
|
+
cancelDialogDismiss: "Cancel",
|
|
13921
|
+
nextPaymentButton: "Proceed to Payment"
|
|
13914
13922
|
}
|
|
13915
13923
|
};
|
|
13916
13924
|
var useStyles28 = makeStyles({
|
|
@@ -13985,6 +13993,12 @@ var useStyles28 = makeStyles({
|
|
|
13985
13993
|
gap: "1rem"
|
|
13986
13994
|
},
|
|
13987
13995
|
ticketInfo: {
|
|
13996
|
+
display: "flex",
|
|
13997
|
+
justifyContent: "space-between",
|
|
13998
|
+
alignItems: "center",
|
|
13999
|
+
gap: "0.5em"
|
|
14000
|
+
},
|
|
14001
|
+
ticketinfoCard: {
|
|
13988
14002
|
display: "flex",
|
|
13989
14003
|
justifyContent: "space-between",
|
|
13990
14004
|
alignItems: "center",
|
|
@@ -14080,6 +14094,7 @@ var CardBookingTicket = ({
|
|
|
14080
14094
|
reservationStep,
|
|
14081
14095
|
paymentStep,
|
|
14082
14096
|
onPriceDetailClick,
|
|
14097
|
+
onTermsAndConditionsClick,
|
|
14083
14098
|
onCancel,
|
|
14084
14099
|
onNext,
|
|
14085
14100
|
onPrevious,
|
|
@@ -14088,6 +14103,11 @@ var CardBookingTicket = ({
|
|
|
14088
14103
|
const styles = useStyles28();
|
|
14089
14104
|
const mergedLabels = { ...DEFAULT_LABELS27[language], ...labels };
|
|
14090
14105
|
const [cancelDialogOpen, setCancelDialogOpen] = useState(false);
|
|
14106
|
+
const [isTermsAccepted, setIsTermsAccepted] = useState(false);
|
|
14107
|
+
const handleTermsAndConditionsClick = () => {
|
|
14108
|
+
onTermsAndConditionsClick?.();
|
|
14109
|
+
};
|
|
14110
|
+
const isNextButtonDisabled = disableNextButton || reservationStep === "review" && !isTermsAccepted;
|
|
14091
14111
|
return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
|
|
14092
14112
|
/* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
|
|
14093
14113
|
/* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.bookingDetails }),
|
|
@@ -14141,26 +14161,32 @@ var CardBookingTicket = ({
|
|
|
14141
14161
|
}
|
|
14142
14162
|
),
|
|
14143
14163
|
/* @__PURE__ */ jsx(Body1Strong, { children: mergedLabels.routeTitle }),
|
|
14144
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
14165
|
+
"div",
|
|
14166
|
+
{
|
|
14167
|
+
className: reservationStep === "review" ? styles.ticketinfoCard : styles.ticketInfo,
|
|
14168
|
+
children: [
|
|
14169
|
+
/* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
|
|
14170
|
+
/* @__PURE__ */ jsx(Caption2, { children: departureDay }),
|
|
14171
|
+
/* @__PURE__ */ jsx(Body1Stronger, { children: departureTime }),
|
|
14172
|
+
/* @__PURE__ */ jsx(Caption2, { children: departureLocation })
|
|
14173
|
+
] }),
|
|
14174
|
+
/* @__PURE__ */ jsxs("div", { className: styles.ticketDuration, children: [
|
|
14175
|
+
/* @__PURE__ */ jsx(Icon, { icon: "fluent:vehicle-ship-24-regular" }),
|
|
14176
|
+
/* @__PURE__ */ jsxs(Caption2, { children: [
|
|
14177
|
+
mergedLabels.estimationPrefix,
|
|
14178
|
+
" ",
|
|
14179
|
+
formatDuration(duration)
|
|
14180
|
+
] })
|
|
14181
|
+
] }),
|
|
14182
|
+
/* @__PURE__ */ jsxs("div", { className: styles.ticketTime, children: [
|
|
14183
|
+
/* @__PURE__ */ jsx(Caption2, { children: arrivalDay }),
|
|
14184
|
+
/* @__PURE__ */ jsx(Body1Stronger, { children: arrivalTime }),
|
|
14185
|
+
/* @__PURE__ */ jsx(Caption2, { children: arrivalLocation })
|
|
14186
|
+
] })
|
|
14187
|
+
]
|
|
14188
|
+
}
|
|
14189
|
+
) }),
|
|
14164
14190
|
/* @__PURE__ */ jsx("div", { className: styles.circularLeft }),
|
|
14165
14191
|
/* @__PURE__ */ jsx("div", { className: styles.circularRight })
|
|
14166
14192
|
] }),
|
|
@@ -14196,15 +14222,28 @@ var CardBookingTicket = ({
|
|
|
14196
14222
|
reservationStep === "review" && /* @__PURE__ */ jsx(
|
|
14197
14223
|
Checkbox,
|
|
14198
14224
|
{
|
|
14225
|
+
checked: isTermsAccepted,
|
|
14226
|
+
onChange: (_, data) => setIsTermsAccepted(!!data.checked),
|
|
14199
14227
|
label: /* @__PURE__ */ jsxs(Body1, { children: [
|
|
14200
|
-
|
|
14228
|
+
mergedLabels.agreementPrefix,
|
|
14201
14229
|
" ",
|
|
14202
|
-
/* @__PURE__ */
|
|
14203
|
-
"
|
|
14204
|
-
|
|
14205
|
-
|
|
14230
|
+
/* @__PURE__ */ jsx(
|
|
14231
|
+
"button",
|
|
14232
|
+
{
|
|
14233
|
+
type: "button",
|
|
14234
|
+
onClick: handleTermsAndConditionsClick,
|
|
14235
|
+
style: {
|
|
14236
|
+
color: brandColors[80],
|
|
14237
|
+
background: "transparent",
|
|
14238
|
+
border: "none",
|
|
14239
|
+
padding: 0,
|
|
14240
|
+
cursor: "pointer"
|
|
14241
|
+
},
|
|
14242
|
+
children: mergedLabels.termsAndConditions
|
|
14243
|
+
}
|
|
14244
|
+
),
|
|
14206
14245
|
" ",
|
|
14207
|
-
|
|
14246
|
+
mergedLabels.agreementSuffix
|
|
14208
14247
|
] })
|
|
14209
14248
|
}
|
|
14210
14249
|
),
|
|
@@ -14213,17 +14252,17 @@ var CardBookingTicket = ({
|
|
|
14213
14252
|
Button,
|
|
14214
14253
|
{
|
|
14215
14254
|
appearance: "primary",
|
|
14216
|
-
disabled:
|
|
14255
|
+
disabled: isNextButtonDisabled,
|
|
14217
14256
|
onClick: onNext,
|
|
14218
14257
|
shape: "circular",
|
|
14219
14258
|
size: "large",
|
|
14220
14259
|
style: { width: "100%" },
|
|
14221
14260
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:chevron-right-20-regular" }),
|
|
14222
14261
|
iconPosition: "after",
|
|
14223
|
-
children: mergedLabels.nextButton
|
|
14262
|
+
children: reservationStep === "review" ? mergedLabels.nextPaymentButton : mergedLabels.nextButton
|
|
14224
14263
|
}
|
|
14225
14264
|
),
|
|
14226
|
-
["addon", "meals", "review", "
|
|
14265
|
+
["addon", "meals", "review", "eticket"].includes(
|
|
14227
14266
|
reservationStep
|
|
14228
14267
|
) && !["pay"].includes(paymentStep) && /* @__PURE__ */ jsx(
|
|
14229
14268
|
Button,
|
|
@@ -14238,31 +14277,18 @@ var CardBookingTicket = ({
|
|
|
14238
14277
|
children: mergedLabels.previousButton
|
|
14239
14278
|
}
|
|
14240
14279
|
),
|
|
14241
|
-
paymentStep === "pay" && /* @__PURE__ */
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
),
|
|
14254
|
-
/* @__PURE__ */ jsx(
|
|
14255
|
-
Button,
|
|
14256
|
-
{
|
|
14257
|
-
appearance: "secondary",
|
|
14258
|
-
shape: "circular",
|
|
14259
|
-
size: "large",
|
|
14260
|
-
className: styles.secondaryButton,
|
|
14261
|
-
onClick: onPrevious,
|
|
14262
|
-
children: mergedLabels.changePaymentButton
|
|
14263
|
-
}
|
|
14264
|
-
)
|
|
14265
|
-
] }),
|
|
14280
|
+
paymentStep === "pay" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
14281
|
+
Button,
|
|
14282
|
+
{
|
|
14283
|
+
appearance: "primary",
|
|
14284
|
+
disabled: disableNextButton,
|
|
14285
|
+
onClick: onNext,
|
|
14286
|
+
shape: "circular",
|
|
14287
|
+
size: "large",
|
|
14288
|
+
style: { width: "100%" },
|
|
14289
|
+
children: mergedLabels.viewBookingButton
|
|
14290
|
+
}
|
|
14291
|
+
) }),
|
|
14266
14292
|
reservationStep === "manifest" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14267
14293
|
/* @__PURE__ */ jsx(
|
|
14268
14294
|
Button,
|