@asdp/ferryui 0.1.22-dev.9698 → 0.1.22-dev.9701
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 +62 -32
- package/dist/index.d.ts +62 -32
- package/dist/index.js +95 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -147,6 +147,34 @@ declare const PRESET_CONTENT: {
|
|
|
147
147
|
readonly imageAlt: "Transaction Limit Illustration";
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
+
readonly UNAUTHENTICATED: {
|
|
151
|
+
readonly id: {
|
|
152
|
+
readonly title: "Masuk untuk melanjutkan pemesanan";
|
|
153
|
+
readonly message: "Untuk memesan tiket dan mengisi manifest penumpang, Anda perlu masuk terlebih dahulu. Pilihan jadwal Anda akan tetap tersimpan.";
|
|
154
|
+
readonly imageSrc: "/assets/images/illustrations/auth.svg";
|
|
155
|
+
readonly imageAlt: "Unauthenticated Illustration";
|
|
156
|
+
};
|
|
157
|
+
readonly en: {
|
|
158
|
+
readonly title: "Sign in to continue booking";
|
|
159
|
+
readonly message: "To book tickets and fill in the passenger manifest, you need to sign in first. Your schedule selection will be saved.";
|
|
160
|
+
readonly imageSrc: "/assets/images/illustrations/auth.svg";
|
|
161
|
+
readonly imageAlt: "Unauthenticated Illustration";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly PROFILE_NOT_COMPLETE: {
|
|
165
|
+
readonly id: {
|
|
166
|
+
readonly title: "Profil Belum Lengkap";
|
|
167
|
+
readonly message: "Untuk melanjutkan pemesanan tiket, kami memerlukan data profil yang lengkap sesuai ketentuan ASDP. Lengkapi profil Anda terlebih dahulu agar dapat melanjutkan ke pengisian manifest.";
|
|
168
|
+
readonly imageSrc: "/assets/images/illustrations/profile.svg";
|
|
169
|
+
readonly imageAlt: "Profile Not Complete Illustration";
|
|
170
|
+
};
|
|
171
|
+
readonly en: {
|
|
172
|
+
readonly title: "Profile Not Complete";
|
|
173
|
+
readonly message: "To continue booking tickets, we need complete profile data according to ASDP provisions. Please complete your profile first to proceed to manifest filling.";
|
|
174
|
+
readonly imageSrc: "/assets/images/illustrations/profile.svg";
|
|
175
|
+
readonly imageAlt: "Profile Not Complete Illustration";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
150
178
|
};
|
|
151
179
|
|
|
152
180
|
/**
|
|
@@ -166,6 +194,8 @@ declare const MODAL_PRESETS: {
|
|
|
166
194
|
readonly SESSION_EXPIRED: Partial<ModalIllustrationProps>;
|
|
167
195
|
readonly PURCHASE_PERIOD_EXPIRED: Partial<ModalIllustrationProps>;
|
|
168
196
|
readonly TRANSACTION_LIMIT: Partial<ModalIllustrationProps>;
|
|
197
|
+
readonly UNAUTHENTICATED: Partial<ModalIllustrationProps>;
|
|
198
|
+
readonly PROFILE_NOT_COMPLETE: Partial<ModalIllustrationProps>;
|
|
169
199
|
};
|
|
170
200
|
|
|
171
201
|
interface CarouselWithCustomNavLabels {
|
|
@@ -403,6 +433,7 @@ interface CardTicketLabels {
|
|
|
403
433
|
timezoneLabel: string;
|
|
404
434
|
currencySymbol: string;
|
|
405
435
|
logoAlt: string;
|
|
436
|
+
verifyingTicketButton: string;
|
|
406
437
|
}
|
|
407
438
|
interface CardTicketProps {
|
|
408
439
|
/**
|
|
@@ -439,6 +470,7 @@ interface CardTicketProps {
|
|
|
439
470
|
*/
|
|
440
471
|
onSelectTicket?: () => void;
|
|
441
472
|
isLoading?: boolean;
|
|
473
|
+
isVerifyingTicket?: boolean;
|
|
442
474
|
}
|
|
443
475
|
interface DepartureItem {
|
|
444
476
|
departureDay: string;
|
|
@@ -1462,6 +1494,17 @@ interface Passenger {
|
|
|
1462
1494
|
regencyName: string;
|
|
1463
1495
|
phoneNumber: string;
|
|
1464
1496
|
email: string;
|
|
1497
|
+
passengerType?: string;
|
|
1498
|
+
serviceName?: string;
|
|
1499
|
+
_indices?: {
|
|
1500
|
+
i0: number;
|
|
1501
|
+
i1: number;
|
|
1502
|
+
i2: number;
|
|
1503
|
+
passengerAgeId: number;
|
|
1504
|
+
passengerAgeLabel: string;
|
|
1505
|
+
passengerClassId: number;
|
|
1506
|
+
passengerClassLabel: string;
|
|
1507
|
+
};
|
|
1465
1508
|
}
|
|
1466
1509
|
/**
|
|
1467
1510
|
* Service with passenger count
|
|
@@ -1889,8 +1932,10 @@ declare const DEFAULT_VEHICLE_ICONS: {
|
|
|
1889
1932
|
};
|
|
1890
1933
|
|
|
1891
1934
|
interface SortOption {
|
|
1892
|
-
value: string;
|
|
1893
1935
|
label: string;
|
|
1936
|
+
value: string;
|
|
1937
|
+
sortBy: string;
|
|
1938
|
+
sortDir: string;
|
|
1894
1939
|
}
|
|
1895
1940
|
interface FilterCount {
|
|
1896
1941
|
typeService?: number;
|
|
@@ -1925,9 +1970,9 @@ interface SortMenuProps {
|
|
|
1925
1970
|
*/
|
|
1926
1971
|
value: string;
|
|
1927
1972
|
/**
|
|
1928
|
-
* Callback when sort value changes
|
|
1973
|
+
* Callback when sort value changes — receives full SortOption object
|
|
1929
1974
|
*/
|
|
1930
|
-
onChange: (
|
|
1975
|
+
onChange: (option: SortOption) => void;
|
|
1931
1976
|
/**
|
|
1932
1977
|
* Total active filter categories
|
|
1933
1978
|
* @default 0
|
|
@@ -1971,10 +2016,7 @@ declare const SortMenu: React$1.FC<SortMenuProps>;
|
|
|
1971
2016
|
/**
|
|
1972
2017
|
* @deprecated Use getSortOptions and find the label from there
|
|
1973
2018
|
*/
|
|
1974
|
-
declare const DEFAULT_SORT_OPTIONS:
|
|
1975
|
-
value: string;
|
|
1976
|
-
label: string;
|
|
1977
|
-
}[];
|
|
2019
|
+
declare const DEFAULT_SORT_OPTIONS: SortOption[];
|
|
1978
2020
|
/**
|
|
1979
2021
|
* @deprecated Use labels directly
|
|
1980
2022
|
*/
|
|
@@ -1995,13 +2037,19 @@ interface ModalFilterTicketProps {
|
|
|
1995
2037
|
*/
|
|
1996
2038
|
onOpenChange: (open: boolean) => void;
|
|
1997
2039
|
/**
|
|
1998
|
-
* Selected service types
|
|
2040
|
+
* Selected service types as objects with id and label
|
|
1999
2041
|
*/
|
|
2000
|
-
selectedServiceTypes:
|
|
2042
|
+
selectedServiceTypes: Array<{
|
|
2043
|
+
id: number;
|
|
2044
|
+
label: string;
|
|
2045
|
+
}>;
|
|
2001
2046
|
/**
|
|
2002
2047
|
* Callback when service types change
|
|
2003
2048
|
*/
|
|
2004
|
-
onServiceTypesChange: (serviceTypes:
|
|
2049
|
+
onServiceTypesChange: (serviceTypes: Array<{
|
|
2050
|
+
id: number;
|
|
2051
|
+
label: string;
|
|
2052
|
+
}>) => void;
|
|
2005
2053
|
/**
|
|
2006
2054
|
* Selected departure time slots
|
|
2007
2055
|
*/
|
|
@@ -2050,7 +2098,7 @@ interface ModalFilterTicketProps {
|
|
|
2050
2098
|
* Service types list (from API data)
|
|
2051
2099
|
*/
|
|
2052
2100
|
serviceTypes?: Array<{
|
|
2053
|
-
value:
|
|
2101
|
+
value: number;
|
|
2054
2102
|
label: string;
|
|
2055
2103
|
}>;
|
|
2056
2104
|
/**
|
|
@@ -2818,24 +2866,6 @@ interface ModalPassengerFormProps {
|
|
|
2818
2866
|
|
|
2819
2867
|
declare const ModalPassengerForm: React$1.FC<ModalPassengerFormProps>;
|
|
2820
2868
|
|
|
2821
|
-
interface PassengerListItem {
|
|
2822
|
-
/**
|
|
2823
|
-
* Unique identifier for the passenger
|
|
2824
|
-
*/
|
|
2825
|
-
id?: number;
|
|
2826
|
-
/**
|
|
2827
|
-
* Passenger name
|
|
2828
|
-
*/
|
|
2829
|
-
name?: string;
|
|
2830
|
-
/**
|
|
2831
|
-
* Passenger type code (e.g., "ADULT", "CHILD", "INFANT")
|
|
2832
|
-
*/
|
|
2833
|
-
passengerType?: string;
|
|
2834
|
-
/**
|
|
2835
|
-
* Service class name (e.g., "ECONOMY", "BUSINESS", "EXECUTIVE")
|
|
2836
|
-
*/
|
|
2837
|
-
serviceName?: string;
|
|
2838
|
-
}
|
|
2839
2869
|
interface CardPassengerListLabels {
|
|
2840
2870
|
defaultTitle: string;
|
|
2841
2871
|
passengerPrefix: string;
|
|
@@ -2854,11 +2884,11 @@ interface CardPassengerListProps {
|
|
|
2854
2884
|
/**
|
|
2855
2885
|
* List of passengers to display
|
|
2856
2886
|
*/
|
|
2857
|
-
passengers:
|
|
2887
|
+
passengers: Passenger[];
|
|
2858
2888
|
/**
|
|
2859
2889
|
* Callback when a passenger is clicked
|
|
2860
2890
|
*/
|
|
2861
|
-
onPassengerClick: (passenger:
|
|
2891
|
+
onPassengerClick: (passenger: Passenger) => void;
|
|
2862
2892
|
/**
|
|
2863
2893
|
* Custom labels override (optional)
|
|
2864
2894
|
* If not provided, default labels based on language will be used
|
|
@@ -3890,4 +3920,4 @@ interface ModalListMenuServiceProps {
|
|
|
3890
3920
|
|
|
3891
3921
|
declare const ModalListMenuService: React$1.FC<ModalListMenuServiceProps>;
|
|
3892
3922
|
|
|
3893
|
-
export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type
|
|
3923
|
+
export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,34 @@ declare const PRESET_CONTENT: {
|
|
|
147
147
|
readonly imageAlt: "Transaction Limit Illustration";
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
+
readonly UNAUTHENTICATED: {
|
|
151
|
+
readonly id: {
|
|
152
|
+
readonly title: "Masuk untuk melanjutkan pemesanan";
|
|
153
|
+
readonly message: "Untuk memesan tiket dan mengisi manifest penumpang, Anda perlu masuk terlebih dahulu. Pilihan jadwal Anda akan tetap tersimpan.";
|
|
154
|
+
readonly imageSrc: "/assets/images/illustrations/auth.svg";
|
|
155
|
+
readonly imageAlt: "Unauthenticated Illustration";
|
|
156
|
+
};
|
|
157
|
+
readonly en: {
|
|
158
|
+
readonly title: "Sign in to continue booking";
|
|
159
|
+
readonly message: "To book tickets and fill in the passenger manifest, you need to sign in first. Your schedule selection will be saved.";
|
|
160
|
+
readonly imageSrc: "/assets/images/illustrations/auth.svg";
|
|
161
|
+
readonly imageAlt: "Unauthenticated Illustration";
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly PROFILE_NOT_COMPLETE: {
|
|
165
|
+
readonly id: {
|
|
166
|
+
readonly title: "Profil Belum Lengkap";
|
|
167
|
+
readonly message: "Untuk melanjutkan pemesanan tiket, kami memerlukan data profil yang lengkap sesuai ketentuan ASDP. Lengkapi profil Anda terlebih dahulu agar dapat melanjutkan ke pengisian manifest.";
|
|
168
|
+
readonly imageSrc: "/assets/images/illustrations/profile.svg";
|
|
169
|
+
readonly imageAlt: "Profile Not Complete Illustration";
|
|
170
|
+
};
|
|
171
|
+
readonly en: {
|
|
172
|
+
readonly title: "Profile Not Complete";
|
|
173
|
+
readonly message: "To continue booking tickets, we need complete profile data according to ASDP provisions. Please complete your profile first to proceed to manifest filling.";
|
|
174
|
+
readonly imageSrc: "/assets/images/illustrations/profile.svg";
|
|
175
|
+
readonly imageAlt: "Profile Not Complete Illustration";
|
|
176
|
+
};
|
|
177
|
+
};
|
|
150
178
|
};
|
|
151
179
|
|
|
152
180
|
/**
|
|
@@ -166,6 +194,8 @@ declare const MODAL_PRESETS: {
|
|
|
166
194
|
readonly SESSION_EXPIRED: Partial<ModalIllustrationProps>;
|
|
167
195
|
readonly PURCHASE_PERIOD_EXPIRED: Partial<ModalIllustrationProps>;
|
|
168
196
|
readonly TRANSACTION_LIMIT: Partial<ModalIllustrationProps>;
|
|
197
|
+
readonly UNAUTHENTICATED: Partial<ModalIllustrationProps>;
|
|
198
|
+
readonly PROFILE_NOT_COMPLETE: Partial<ModalIllustrationProps>;
|
|
169
199
|
};
|
|
170
200
|
|
|
171
201
|
interface CarouselWithCustomNavLabels {
|
|
@@ -403,6 +433,7 @@ interface CardTicketLabels {
|
|
|
403
433
|
timezoneLabel: string;
|
|
404
434
|
currencySymbol: string;
|
|
405
435
|
logoAlt: string;
|
|
436
|
+
verifyingTicketButton: string;
|
|
406
437
|
}
|
|
407
438
|
interface CardTicketProps {
|
|
408
439
|
/**
|
|
@@ -439,6 +470,7 @@ interface CardTicketProps {
|
|
|
439
470
|
*/
|
|
440
471
|
onSelectTicket?: () => void;
|
|
441
472
|
isLoading?: boolean;
|
|
473
|
+
isVerifyingTicket?: boolean;
|
|
442
474
|
}
|
|
443
475
|
interface DepartureItem {
|
|
444
476
|
departureDay: string;
|
|
@@ -1462,6 +1494,17 @@ interface Passenger {
|
|
|
1462
1494
|
regencyName: string;
|
|
1463
1495
|
phoneNumber: string;
|
|
1464
1496
|
email: string;
|
|
1497
|
+
passengerType?: string;
|
|
1498
|
+
serviceName?: string;
|
|
1499
|
+
_indices?: {
|
|
1500
|
+
i0: number;
|
|
1501
|
+
i1: number;
|
|
1502
|
+
i2: number;
|
|
1503
|
+
passengerAgeId: number;
|
|
1504
|
+
passengerAgeLabel: string;
|
|
1505
|
+
passengerClassId: number;
|
|
1506
|
+
passengerClassLabel: string;
|
|
1507
|
+
};
|
|
1465
1508
|
}
|
|
1466
1509
|
/**
|
|
1467
1510
|
* Service with passenger count
|
|
@@ -1889,8 +1932,10 @@ declare const DEFAULT_VEHICLE_ICONS: {
|
|
|
1889
1932
|
};
|
|
1890
1933
|
|
|
1891
1934
|
interface SortOption {
|
|
1892
|
-
value: string;
|
|
1893
1935
|
label: string;
|
|
1936
|
+
value: string;
|
|
1937
|
+
sortBy: string;
|
|
1938
|
+
sortDir: string;
|
|
1894
1939
|
}
|
|
1895
1940
|
interface FilterCount {
|
|
1896
1941
|
typeService?: number;
|
|
@@ -1925,9 +1970,9 @@ interface SortMenuProps {
|
|
|
1925
1970
|
*/
|
|
1926
1971
|
value: string;
|
|
1927
1972
|
/**
|
|
1928
|
-
* Callback when sort value changes
|
|
1973
|
+
* Callback when sort value changes — receives full SortOption object
|
|
1929
1974
|
*/
|
|
1930
|
-
onChange: (
|
|
1975
|
+
onChange: (option: SortOption) => void;
|
|
1931
1976
|
/**
|
|
1932
1977
|
* Total active filter categories
|
|
1933
1978
|
* @default 0
|
|
@@ -1971,10 +2016,7 @@ declare const SortMenu: React$1.FC<SortMenuProps>;
|
|
|
1971
2016
|
/**
|
|
1972
2017
|
* @deprecated Use getSortOptions and find the label from there
|
|
1973
2018
|
*/
|
|
1974
|
-
declare const DEFAULT_SORT_OPTIONS:
|
|
1975
|
-
value: string;
|
|
1976
|
-
label: string;
|
|
1977
|
-
}[];
|
|
2019
|
+
declare const DEFAULT_SORT_OPTIONS: SortOption[];
|
|
1978
2020
|
/**
|
|
1979
2021
|
* @deprecated Use labels directly
|
|
1980
2022
|
*/
|
|
@@ -1995,13 +2037,19 @@ interface ModalFilterTicketProps {
|
|
|
1995
2037
|
*/
|
|
1996
2038
|
onOpenChange: (open: boolean) => void;
|
|
1997
2039
|
/**
|
|
1998
|
-
* Selected service types
|
|
2040
|
+
* Selected service types as objects with id and label
|
|
1999
2041
|
*/
|
|
2000
|
-
selectedServiceTypes:
|
|
2042
|
+
selectedServiceTypes: Array<{
|
|
2043
|
+
id: number;
|
|
2044
|
+
label: string;
|
|
2045
|
+
}>;
|
|
2001
2046
|
/**
|
|
2002
2047
|
* Callback when service types change
|
|
2003
2048
|
*/
|
|
2004
|
-
onServiceTypesChange: (serviceTypes:
|
|
2049
|
+
onServiceTypesChange: (serviceTypes: Array<{
|
|
2050
|
+
id: number;
|
|
2051
|
+
label: string;
|
|
2052
|
+
}>) => void;
|
|
2005
2053
|
/**
|
|
2006
2054
|
* Selected departure time slots
|
|
2007
2055
|
*/
|
|
@@ -2050,7 +2098,7 @@ interface ModalFilterTicketProps {
|
|
|
2050
2098
|
* Service types list (from API data)
|
|
2051
2099
|
*/
|
|
2052
2100
|
serviceTypes?: Array<{
|
|
2053
|
-
value:
|
|
2101
|
+
value: number;
|
|
2054
2102
|
label: string;
|
|
2055
2103
|
}>;
|
|
2056
2104
|
/**
|
|
@@ -2818,24 +2866,6 @@ interface ModalPassengerFormProps {
|
|
|
2818
2866
|
|
|
2819
2867
|
declare const ModalPassengerForm: React$1.FC<ModalPassengerFormProps>;
|
|
2820
2868
|
|
|
2821
|
-
interface PassengerListItem {
|
|
2822
|
-
/**
|
|
2823
|
-
* Unique identifier for the passenger
|
|
2824
|
-
*/
|
|
2825
|
-
id?: number;
|
|
2826
|
-
/**
|
|
2827
|
-
* Passenger name
|
|
2828
|
-
*/
|
|
2829
|
-
name?: string;
|
|
2830
|
-
/**
|
|
2831
|
-
* Passenger type code (e.g., "ADULT", "CHILD", "INFANT")
|
|
2832
|
-
*/
|
|
2833
|
-
passengerType?: string;
|
|
2834
|
-
/**
|
|
2835
|
-
* Service class name (e.g., "ECONOMY", "BUSINESS", "EXECUTIVE")
|
|
2836
|
-
*/
|
|
2837
|
-
serviceName?: string;
|
|
2838
|
-
}
|
|
2839
2869
|
interface CardPassengerListLabels {
|
|
2840
2870
|
defaultTitle: string;
|
|
2841
2871
|
passengerPrefix: string;
|
|
@@ -2854,11 +2884,11 @@ interface CardPassengerListProps {
|
|
|
2854
2884
|
/**
|
|
2855
2885
|
* List of passengers to display
|
|
2856
2886
|
*/
|
|
2857
|
-
passengers:
|
|
2887
|
+
passengers: Passenger[];
|
|
2858
2888
|
/**
|
|
2859
2889
|
* Callback when a passenger is clicked
|
|
2860
2890
|
*/
|
|
2861
|
-
onPassengerClick: (passenger:
|
|
2891
|
+
onPassengerClick: (passenger: Passenger) => void;
|
|
2862
2892
|
/**
|
|
2863
2893
|
* Custom labels override (optional)
|
|
2864
2894
|
* If not provided, default labels based on language will be used
|
|
@@ -3890,4 +3920,4 @@ interface ModalListMenuServiceProps {
|
|
|
3890
3920
|
|
|
3891
3921
|
declare const ModalListMenuService: React$1.FC<ModalListMenuServiceProps>;
|
|
3892
3922
|
|
|
3893
|
-
export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type
|
|
3923
|
+
export { API_CONFIG, API_ENDPOINTS, API_ERROR_MESSAGES, BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, type BillingDetail, COUNTRIES, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuLabels, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$4 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$3 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryOption, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type DepartureItem, EmptyContent, type EmptyContentButton, DEFAULT_LABELS$2 as EmptyContentDefaultLabels, type EmptyContentLabels, type EmptyContentProps, FileUpload, type FileUploadProps, type FilterCount, GENDER, type GENDER_TYPE, HARDCODED_ID, HTTP_STATUS, type HarborItem, IDENTITY_TYPE, type IDENTITY_TYPE_TYPE, InputDynamic, type InputDynamicProps, type InputType, LOAD_TYPE, type LOAD_TYPE_TYPE, type LoadType, MANIFEST_ENTITY, type MANIFEST_ENTITY_TYPE, MODAL_PRESETS, MY_TICKET_STATUS, type MY_TICKET_STATUS_TYPE, MY_TICKET_TAB, type MY_TICKET_TAB_TYPE, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListMenuService, type ModalListMenuServiceProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPreviewImage, type ModalPreviewImageProps, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type CardServiceMenuItem as ModalServiceItem, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, PASSENGER_TYPE, type PASSENGER_TYPE_TYPE, type Passenger, type PassengerClass, type PassengerFormData, type PassengerService, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type Provider, type RadioOption, type ReservationStep, type ReviewPassengerItem, type RouteItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, calculateAge, getBadgeConfig, getModalPreset, getSortLabel, hexToRgba };
|
package/dist/index.js
CHANGED
|
@@ -89,6 +89,34 @@ var PRESET_CONTENT = {
|
|
|
89
89
|
imageSrc: "/assets/images/illustrations/mobile-pay.svg",
|
|
90
90
|
imageAlt: "Transaction Limit Illustration"
|
|
91
91
|
}
|
|
92
|
+
},
|
|
93
|
+
UNAUTHENTICATED: {
|
|
94
|
+
id: {
|
|
95
|
+
title: "Masuk untuk melanjutkan pemesanan",
|
|
96
|
+
message: "Untuk memesan tiket dan mengisi manifest penumpang, Anda perlu masuk terlebih dahulu. Pilihan jadwal Anda akan tetap tersimpan.",
|
|
97
|
+
imageSrc: "/assets/images/illustrations/auth.svg",
|
|
98
|
+
imageAlt: "Unauthenticated Illustration"
|
|
99
|
+
},
|
|
100
|
+
en: {
|
|
101
|
+
title: "Sign in to continue booking",
|
|
102
|
+
message: "To book tickets and fill in the passenger manifest, you need to sign in first. Your schedule selection will be saved.",
|
|
103
|
+
imageSrc: "/assets/images/illustrations/auth.svg",
|
|
104
|
+
imageAlt: "Unauthenticated Illustration"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
PROFILE_NOT_COMPLETE: {
|
|
108
|
+
id: {
|
|
109
|
+
title: "Profil Belum Lengkap",
|
|
110
|
+
message: "Untuk melanjutkan pemesanan tiket, kami memerlukan data profil yang lengkap sesuai ketentuan ASDP. Lengkapi profil Anda terlebih dahulu agar dapat melanjutkan ke pengisian manifest.",
|
|
111
|
+
imageSrc: "/assets/images/illustrations/profile.svg",
|
|
112
|
+
imageAlt: "Profile Not Complete Illustration"
|
|
113
|
+
},
|
|
114
|
+
en: {
|
|
115
|
+
title: "Profile Not Complete",
|
|
116
|
+
message: "To continue booking tickets, we need complete profile data according to ASDP provisions. Please complete your profile first to proceed to manifest filling.",
|
|
117
|
+
imageSrc: "/assets/images/illustrations/profile.svg",
|
|
118
|
+
imageAlt: "Profile Not Complete Illustration"
|
|
119
|
+
}
|
|
92
120
|
}
|
|
93
121
|
};
|
|
94
122
|
var useStyles = reactComponents.makeStyles({
|
|
@@ -198,7 +226,9 @@ var MODAL_PRESETS = {
|
|
|
198
226
|
RADIUS: getModalPreset("RADIUS", "id"),
|
|
199
227
|
SESSION_EXPIRED: getModalPreset("SESSION_EXPIRED", "id"),
|
|
200
228
|
PURCHASE_PERIOD_EXPIRED: getModalPreset("PURCHASE_PERIOD_EXPIRED", "id"),
|
|
201
|
-
TRANSACTION_LIMIT: getModalPreset("TRANSACTION_LIMIT", "id")
|
|
229
|
+
TRANSACTION_LIMIT: getModalPreset("TRANSACTION_LIMIT", "id"),
|
|
230
|
+
UNAUTHENTICATED: getModalPreset("UNAUTHENTICATED", "id"),
|
|
231
|
+
PROFILE_NOT_COMPLETE: getModalPreset("PROFILE_NOT_COMPLETE", "id")
|
|
202
232
|
};
|
|
203
233
|
|
|
204
234
|
// src/components/CarouselWithCustomNav/CarouselWithCustomNav.constants.ts
|
|
@@ -247,6 +277,8 @@ var fontWeight = {
|
|
|
247
277
|
var sharedColors = {
|
|
248
278
|
"Shared_Cranberry_Primary": "#c50f1f",
|
|
249
279
|
"Shared_Red_Primary": "#d13438",
|
|
280
|
+
"Shared_Orange_Shade_20": "#bc4b09",
|
|
281
|
+
"Shared_Orange_Tint_60": "#fff9f5",
|
|
250
282
|
"Shared_Green_Primary": "#107c10"};
|
|
251
283
|
var lightModeColors = {
|
|
252
284
|
"Neutral_Foreground_Disabled_Rest": "#bdbdbd",
|
|
@@ -1121,7 +1153,8 @@ var DEFAULT_LABELS5 = {
|
|
|
1121
1153
|
selectTicketButton: "Pilih Tiket",
|
|
1122
1154
|
timezoneLabel: "WIB",
|
|
1123
1155
|
currencySymbol: "IDR",
|
|
1124
|
-
logoAlt: "Logo ASDP"
|
|
1156
|
+
logoAlt: "Logo ASDP",
|
|
1157
|
+
verifyingTicketButton: "Memeriksa Tiket"
|
|
1125
1158
|
},
|
|
1126
1159
|
en: {
|
|
1127
1160
|
availableSeatsLabel: "Available",
|
|
@@ -1133,7 +1166,8 @@ var DEFAULT_LABELS5 = {
|
|
|
1133
1166
|
selectTicketButton: "Select Ticket",
|
|
1134
1167
|
timezoneLabel: "WIB",
|
|
1135
1168
|
currencySymbol: "IDR",
|
|
1136
|
-
logoAlt: "ASDP Logo"
|
|
1169
|
+
logoAlt: "ASDP Logo",
|
|
1170
|
+
verifyingTicketButton: "Verifying Ticket"
|
|
1137
1171
|
}
|
|
1138
1172
|
};
|
|
1139
1173
|
|
|
@@ -1349,7 +1383,8 @@ var CardTicket = ({
|
|
|
1349
1383
|
onPriceDetailClick,
|
|
1350
1384
|
onPolicyClick,
|
|
1351
1385
|
onSelectTicket,
|
|
1352
|
-
isLoading = false
|
|
1386
|
+
isLoading = false,
|
|
1387
|
+
isVerifyingTicket = false
|
|
1353
1388
|
}) => {
|
|
1354
1389
|
const styles = useStyles5();
|
|
1355
1390
|
const { width } = useWindowSize();
|
|
@@ -1699,8 +1734,13 @@ var CardTicket = ({
|
|
|
1699
1734
|
style: { backgroundColor: brandColors["60"] },
|
|
1700
1735
|
size: "medium",
|
|
1701
1736
|
shape: "circular",
|
|
1702
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-24-filled" }),
|
|
1703
|
-
|
|
1737
|
+
icon: isVerifyingTicket ? null : /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:ticket-diagonal-24-filled" }),
|
|
1738
|
+
disabled: isVerifyingTicket,
|
|
1739
|
+
children: isVerifyingTicket ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1740
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Spinner, { size: "extra-tiny", style: { marginRight: "5px" } }),
|
|
1741
|
+
" ",
|
|
1742
|
+
mergedLabels.verifyingTicketButton
|
|
1743
|
+
] }) : buttonText || mergedLabels.selectTicketButton
|
|
1704
1744
|
}
|
|
1705
1745
|
)
|
|
1706
1746
|
] }),
|
|
@@ -8748,18 +8788,18 @@ var DEFAULT_LABELS16 = {
|
|
|
8748
8788
|
}
|
|
8749
8789
|
};
|
|
8750
8790
|
var getSortOptions = (labels) => [
|
|
8751
|
-
{ value: "
|
|
8752
|
-
{ value: "
|
|
8753
|
-
{ value: "
|
|
8754
|
-
{ value: "
|
|
8755
|
-
{ value: "
|
|
8791
|
+
{ value: "recommended", sortBy: "recommendation", sortDir: "ASC", label: labels.recommendation },
|
|
8792
|
+
{ value: "price-desc", sortBy: "price", sortDir: "DESC", label: labels.highestPrice },
|
|
8793
|
+
{ value: "price-asc", sortBy: "price", sortDir: "ASC", label: labels.lowestPrice },
|
|
8794
|
+
{ value: "departure-asc", sortBy: "departure", sortDir: "ASC", label: labels.earliestDeparture },
|
|
8795
|
+
{ value: "departure-desc", sortBy: "departure", sortDir: "DESC", label: labels.latestDeparture }
|
|
8756
8796
|
];
|
|
8757
8797
|
var DEFAULT_SORT_OPTIONS = [
|
|
8758
|
-
{ value: "
|
|
8759
|
-
{ value: "
|
|
8760
|
-
{ value: "
|
|
8761
|
-
{ value: "
|
|
8762
|
-
{ value: "
|
|
8798
|
+
{ value: "recommended", sortBy: "recommendation", sortDir: "ASC", label: "Rekomendasi" },
|
|
8799
|
+
{ value: "price-desc", sortBy: "price", sortDir: "DESC", label: "Harga Tertinggi" },
|
|
8800
|
+
{ value: "price-asc", sortBy: "price", sortDir: "ASC", label: "Harga Terendah" },
|
|
8801
|
+
{ value: "departure-asc", sortBy: "departure", sortDir: "ASC", label: "Keberangkatan Paling Awal" },
|
|
8802
|
+
{ value: "departure-desc", sortBy: "departure", sortDir: "DESC", label: "Keberangkatan Paling Akhir" }
|
|
8763
8803
|
];
|
|
8764
8804
|
var getSortLabel = (value) => {
|
|
8765
8805
|
const option = DEFAULT_SORT_OPTIONS.find((opt) => opt.value === value);
|
|
@@ -8833,8 +8873,9 @@ var SortMenu = ({
|
|
|
8833
8873
|
() => sortOptions.find((opt) => opt.value === value)?.label || labels.recommendation,
|
|
8834
8874
|
[sortOptions, value, labels.recommendation]
|
|
8835
8875
|
);
|
|
8876
|
+
const defaultOption = sortOptions.find((opt) => opt.value === "recommended") || sortOptions[0];
|
|
8836
8877
|
const handleReset = () => {
|
|
8837
|
-
onChange(
|
|
8878
|
+
onChange(defaultOption);
|
|
8838
8879
|
};
|
|
8839
8880
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.container, children: [
|
|
8840
8881
|
onFilterClick && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8866,7 +8907,10 @@ var SortMenu = ({
|
|
|
8866
8907
|
reactComponents.RadioGroup,
|
|
8867
8908
|
{
|
|
8868
8909
|
value,
|
|
8869
|
-
onChange: (_, data) =>
|
|
8910
|
+
onChange: (_, data) => {
|
|
8911
|
+
const selected = sortOptions.find((opt) => opt.value === data.value);
|
|
8912
|
+
if (selected) onChange(selected);
|
|
8913
|
+
},
|
|
8870
8914
|
children: sortOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8871
8915
|
reactComponents.Radio,
|
|
8872
8916
|
{
|
|
@@ -9115,11 +9159,12 @@ var ModalFilterTicket = ({
|
|
|
9115
9159
|
};
|
|
9116
9160
|
}
|
|
9117
9161
|
}, [open]);
|
|
9118
|
-
const handleServiceTypeToggle = (
|
|
9119
|
-
|
|
9120
|
-
|
|
9162
|
+
const handleServiceTypeToggle = (service) => {
|
|
9163
|
+
const exists = selectedServiceTypes.some((s) => s.id === service.value);
|
|
9164
|
+
if (exists) {
|
|
9165
|
+
onServiceTypesChange(selectedServiceTypes.filter((s) => s.id !== service.value));
|
|
9121
9166
|
} else {
|
|
9122
|
-
onServiceTypesChange([...selectedServiceTypes, value]);
|
|
9167
|
+
onServiceTypesChange([...selectedServiceTypes, { id: service.value, label: service.label }]);
|
|
9123
9168
|
}
|
|
9124
9169
|
};
|
|
9125
9170
|
const handleDepartureTimeChange = (value, checked) => {
|
|
@@ -9295,8 +9340,8 @@ var ModalFilterTicket = ({
|
|
|
9295
9340
|
isLoading ? renderServiceTypesSkeleton() : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.section, children: [
|
|
9296
9341
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: mergedLabels.serviceTypeLabel }),
|
|
9297
9342
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.buttonGrid, children: serviceTypes.map((service) => {
|
|
9298
|
-
const isSelected = selectedServiceTypes.
|
|
9299
|
-
service.value
|
|
9343
|
+
const isSelected = selectedServiceTypes.some(
|
|
9344
|
+
(s) => s.id === service.value
|
|
9300
9345
|
);
|
|
9301
9346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9302
9347
|
reactComponents.Button,
|
|
@@ -9304,7 +9349,7 @@ var ModalFilterTicket = ({
|
|
|
9304
9349
|
appearance: isSelected ? "primary" : "outline",
|
|
9305
9350
|
className: isSelected ? "" : styles.outlinePrimary,
|
|
9306
9351
|
size: "large",
|
|
9307
|
-
onClick: () => handleServiceTypeToggle(service
|
|
9352
|
+
onClick: () => handleServiceTypeToggle(service),
|
|
9308
9353
|
style: { width: "100%" },
|
|
9309
9354
|
children: service.label
|
|
9310
9355
|
},
|
|
@@ -11858,6 +11903,25 @@ var useStyles25 = reactComponents.makeStyles({
|
|
|
11858
11903
|
height: "32px",
|
|
11859
11904
|
zIndex: 1,
|
|
11860
11905
|
filter: "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"
|
|
11906
|
+
},
|
|
11907
|
+
warningBanner: {
|
|
11908
|
+
display: "flex",
|
|
11909
|
+
alignItems: "center",
|
|
11910
|
+
gap: "0.75rem",
|
|
11911
|
+
backgroundColor: sharedColors.Shared_Orange_Tint_60,
|
|
11912
|
+
border: `1px solid ${sharedColors.Shared_Orange_Shade_20}`,
|
|
11913
|
+
borderRadius: reactComponents.tokens.borderRadiusLarge,
|
|
11914
|
+
padding: "0.75rem 1rem",
|
|
11915
|
+
marginBottom: "1.5rem"
|
|
11916
|
+
},
|
|
11917
|
+
warningIcon: {
|
|
11918
|
+
color: sharedColors.Shared_Orange_Shade_20,
|
|
11919
|
+
flexShrink: 0,
|
|
11920
|
+
display: "flex"
|
|
11921
|
+
},
|
|
11922
|
+
warningText: {
|
|
11923
|
+
color: sharedColors.Shared_Orange_Shade_20,
|
|
11924
|
+
fontSize: reactComponents.tokens.fontSizeBase300
|
|
11861
11925
|
}
|
|
11862
11926
|
});
|
|
11863
11927
|
var CardPassengerList = ({
|
|
@@ -11876,6 +11940,10 @@ var CardPassengerList = ({
|
|
|
11876
11940
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title3, { className: styles.headerTitle, children: displayTitle }),
|
|
11877
11941
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.headerLine })
|
|
11878
11942
|
] }),
|
|
11943
|
+
passengers.filter((p) => p.id).length !== passengers.length && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.warningBanner, children: [
|
|
11944
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.warningIcon, children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:warning-20-filled", width: 24, height: 24 }) }),
|
|
11945
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.warningText, children: "Harap isi data penumpang dibawah ini untuk bisa melanjutkan pembelian tiket." })
|
|
11946
|
+
] }),
|
|
11879
11947
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.passengerList, children: passengers.map((passenger, index) => {
|
|
11880
11948
|
const badgeConfig = getBadgeConfig(passenger.serviceName);
|
|
11881
11949
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -11893,7 +11961,7 @@ var CardPassengerList = ({
|
|
|
11893
11961
|
},
|
|
11894
11962
|
children: [
|
|
11895
11963
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.passengerInfo, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Subtitle2, { className: styles.passengerText, children: [
|
|
11896
|
-
passenger.
|
|
11964
|
+
passenger.fullName || `${mergedLabels.passengerPrefix} ${index + 1}`,
|
|
11897
11965
|
" ",
|
|
11898
11966
|
"(",
|
|
11899
11967
|
passenger.passengerType,
|
|
@@ -11925,7 +11993,7 @@ var CardPassengerList = ({
|
|
|
11925
11993
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11926
11994
|
react.Icon,
|
|
11927
11995
|
{
|
|
11928
|
-
icon: passenger.
|
|
11996
|
+
icon: passenger.id && passenger.serviceName ? "fluent:edit-24-regular" : "fluent:chevron-right-24-regular",
|
|
11929
11997
|
width: 20,
|
|
11930
11998
|
height: 20
|
|
11931
11999
|
}
|