@asdp/ferryui 0.1.22-dev.10407 → 0.1.22-dev.10508
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +55 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1061,6 +1061,7 @@ interface HarborItem {
|
|
|
1061
1061
|
rowNum: number;
|
|
1062
1062
|
isFavorite: boolean;
|
|
1063
1063
|
routeId?: number;
|
|
1064
|
+
isRoundTripAvailable?: boolean;
|
|
1064
1065
|
}
|
|
1065
1066
|
/**
|
|
1066
1067
|
* Labels for ModalSearchHarbor component
|
|
@@ -3159,6 +3160,7 @@ interface CardBookingTicketLabels {
|
|
|
3159
3160
|
cancelDialogBody: string;
|
|
3160
3161
|
cancelDialogConfirm: string;
|
|
3161
3162
|
cancelDialogDismiss: string;
|
|
3163
|
+
nextPaymentButton: string;
|
|
3162
3164
|
}
|
|
3163
3165
|
interface CardBookingTicketProps {
|
|
3164
3166
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1061,6 +1061,7 @@ interface HarborItem {
|
|
|
1061
1061
|
rowNum: number;
|
|
1062
1062
|
isFavorite: boolean;
|
|
1063
1063
|
routeId?: number;
|
|
1064
|
+
isRoundTripAvailable?: boolean;
|
|
1064
1065
|
}
|
|
1065
1066
|
/**
|
|
1066
1067
|
* Labels for ModalSearchHarbor component
|
|
@@ -3159,6 +3160,7 @@ interface CardBookingTicketLabels {
|
|
|
3159
3160
|
cancelDialogBody: string;
|
|
3160
3161
|
cancelDialogConfirm: string;
|
|
3161
3162
|
cancelDialogDismiss: string;
|
|
3163
|
+
nextPaymentButton: string;
|
|
3162
3164
|
}
|
|
3163
3165
|
interface CardBookingTicketProps {
|
|
3164
3166
|
/**
|
package/dist/index.js
CHANGED
|
@@ -13905,7 +13905,8 @@ var DEFAULT_LABELS27 = {
|
|
|
13905
13905
|
cancelDialogTitle: "Buang perubahan?",
|
|
13906
13906
|
cancelDialogBody: "Perubahan belum disimpan dan akan hilang jika Anda melanjutkan.",
|
|
13907
13907
|
cancelDialogConfirm: "Buang Perubahan",
|
|
13908
|
-
cancelDialogDismiss: "Batal"
|
|
13908
|
+
cancelDialogDismiss: "Batal",
|
|
13909
|
+
nextPaymentButton: "Lanjut ke Pembayaran"
|
|
13909
13910
|
},
|
|
13910
13911
|
en: {
|
|
13911
13912
|
bookingDetails: "Booking Details",
|
|
@@ -13925,7 +13926,8 @@ var DEFAULT_LABELS27 = {
|
|
|
13925
13926
|
cancelDialogTitle: "Discard changes?",
|
|
13926
13927
|
cancelDialogBody: "Changes have not been saved and will be lost if you continue.",
|
|
13927
13928
|
cancelDialogConfirm: "Discard Changes",
|
|
13928
|
-
cancelDialogDismiss: "Cancel"
|
|
13929
|
+
cancelDialogDismiss: "Cancel",
|
|
13930
|
+
nextPaymentButton: "Proceed to Payment"
|
|
13929
13931
|
}
|
|
13930
13932
|
};
|
|
13931
13933
|
var useStyles28 = reactComponents.makeStyles({
|
|
@@ -14000,6 +14002,12 @@ var useStyles28 = reactComponents.makeStyles({
|
|
|
14000
14002
|
gap: "1rem"
|
|
14001
14003
|
},
|
|
14002
14004
|
ticketInfo: {
|
|
14005
|
+
display: "flex",
|
|
14006
|
+
justifyContent: "space-between",
|
|
14007
|
+
alignItems: "center",
|
|
14008
|
+
gap: "0.5em"
|
|
14009
|
+
},
|
|
14010
|
+
ticketinfoCard: {
|
|
14003
14011
|
display: "flex",
|
|
14004
14012
|
justifyContent: "space-between",
|
|
14005
14013
|
alignItems: "center",
|
|
@@ -14104,9 +14112,11 @@ var CardBookingTicket = ({
|
|
|
14104
14112
|
const styles = useStyles28();
|
|
14105
14113
|
const mergedLabels = { ...DEFAULT_LABELS27[language], ...labels };
|
|
14106
14114
|
const [cancelDialogOpen, setCancelDialogOpen] = React.useState(false);
|
|
14115
|
+
const [isTermsAccepted, setIsTermsAccepted] = React.useState(false);
|
|
14107
14116
|
const handleTermsAndConditionsClick = () => {
|
|
14108
14117
|
onTermsAndConditionsClick?.();
|
|
14109
14118
|
};
|
|
14119
|
+
const isNextButtonDisabled = disableNextButton || reservationStep === "review" && !isTermsAccepted;
|
|
14110
14120
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.bookingDetail, children: [
|
|
14111
14121
|
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.bookingDetailTop, children: [
|
|
14112
14122
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.bookingDetails }),
|
|
@@ -14160,26 +14170,32 @@ var CardBookingTicket = ({
|
|
|
14160
14170
|
}
|
|
14161
14171
|
),
|
|
14162
14172
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: mergedLabels.routeTitle }),
|
|
14163
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
|
|
14173
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14174
|
+
"div",
|
|
14175
|
+
{
|
|
14176
|
+
className: reservationStep === "review" ? styles.ticketinfoCard : styles.ticketInfo,
|
|
14177
|
+
children: [
|
|
14178
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketTime, children: [
|
|
14179
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: departureDay }),
|
|
14180
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: departureTime }),
|
|
14181
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: departureLocation })
|
|
14182
|
+
] }),
|
|
14183
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketDuration, children: [
|
|
14184
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:vehicle-ship-24-regular" }),
|
|
14185
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Caption2, { children: [
|
|
14186
|
+
mergedLabels.estimationPrefix,
|
|
14187
|
+
" ",
|
|
14188
|
+
formatDuration(duration)
|
|
14189
|
+
] })
|
|
14190
|
+
] }),
|
|
14191
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.ticketTime, children: [
|
|
14192
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: arrivalDay }),
|
|
14193
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Stronger, { children: arrivalTime }),
|
|
14194
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Caption2, { children: arrivalLocation })
|
|
14195
|
+
] })
|
|
14196
|
+
]
|
|
14197
|
+
}
|
|
14198
|
+
) }),
|
|
14183
14199
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.circularLeft }),
|
|
14184
14200
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.circularRight })
|
|
14185
14201
|
] }),
|
|
@@ -14215,6 +14231,8 @@ var CardBookingTicket = ({
|
|
|
14215
14231
|
reservationStep === "review" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14216
14232
|
reactComponents.Checkbox,
|
|
14217
14233
|
{
|
|
14234
|
+
checked: isTermsAccepted,
|
|
14235
|
+
onChange: (_, data) => setIsTermsAccepted(!!data.checked),
|
|
14218
14236
|
label: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { children: [
|
|
14219
14237
|
mergedLabels.agreementPrefix,
|
|
14220
14238
|
" ",
|
|
@@ -14243,17 +14261,17 @@ var CardBookingTicket = ({
|
|
|
14243
14261
|
reactComponents.Button,
|
|
14244
14262
|
{
|
|
14245
14263
|
appearance: "primary",
|
|
14246
|
-
disabled:
|
|
14264
|
+
disabled: isNextButtonDisabled,
|
|
14247
14265
|
onClick: onNext,
|
|
14248
14266
|
shape: "circular",
|
|
14249
14267
|
size: "large",
|
|
14250
14268
|
style: { width: "100%" },
|
|
14251
14269
|
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:chevron-right-20-regular" }),
|
|
14252
14270
|
iconPosition: "after",
|
|
14253
|
-
children: mergedLabels.nextButton
|
|
14271
|
+
children: reservationStep === "review" ? mergedLabels.nextPaymentButton : mergedLabels.nextButton
|
|
14254
14272
|
}
|
|
14255
14273
|
),
|
|
14256
|
-
["addon", "meals", "review", "
|
|
14274
|
+
["addon", "meals", "review", "eticket"].includes(
|
|
14257
14275
|
reservationStep
|
|
14258
14276
|
) && !["pay"].includes(paymentStep) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14259
14277
|
reactComponents.Button,
|
|
@@ -14268,31 +14286,18 @@ var CardBookingTicket = ({
|
|
|
14268
14286
|
children: mergedLabels.previousButton
|
|
14269
14287
|
}
|
|
14270
14288
|
),
|
|
14271
|
-
paymentStep === "pay" && /* @__PURE__ */ jsxRuntime.
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
),
|
|
14284
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14285
|
-
reactComponents.Button,
|
|
14286
|
-
{
|
|
14287
|
-
appearance: "secondary",
|
|
14288
|
-
shape: "circular",
|
|
14289
|
-
size: "large",
|
|
14290
|
-
className: styles.secondaryButton,
|
|
14291
|
-
onClick: onPrevious,
|
|
14292
|
-
children: mergedLabels.changePaymentButton
|
|
14293
|
-
}
|
|
14294
|
-
)
|
|
14295
|
-
] }),
|
|
14289
|
+
paymentStep === "pay" && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14290
|
+
reactComponents.Button,
|
|
14291
|
+
{
|
|
14292
|
+
appearance: "primary",
|
|
14293
|
+
disabled: disableNextButton,
|
|
14294
|
+
onClick: onNext,
|
|
14295
|
+
shape: "circular",
|
|
14296
|
+
size: "large",
|
|
14297
|
+
style: { width: "100%" },
|
|
14298
|
+
children: mergedLabels.viewBookingButton
|
|
14299
|
+
}
|
|
14300
|
+
) }),
|
|
14296
14301
|
reservationStep === "manifest" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14297
14302
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14298
14303
|
reactComponents.Button,
|